Version 0.5.20.1
svn merge -r 24103:24104 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -r 24144:24145 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -r 24149:24150 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
git-svn-id: http://dart.googlecode.com/svn/trunk@24151 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/bin/directory.h b/runtime/bin/directory.h
index 5fa10f0..89ec90b 100644
--- a/runtime/bin/directory.h
+++ b/runtime/bin/directory.h
@@ -84,15 +84,7 @@
link_ = link;
}
- void ResetLink() {
- if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
- free(link_);
- link_ = NULL;
- }
- if (parent_ != NULL) {
- link_ = parent_->link_;
- }
- }
+ void ResetLink();
private:
DirectoryListingEntry* parent_;
diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc
index 5c0f891..b48474d 100644
--- a/runtime/bin/directory_android.cc
+++ b/runtime/bin/directory_android.cc
@@ -23,7 +23,7 @@
PathBuffer::PathBuffer() : length_(0) {
- data_ = new char[PATH_MAX + 1];
+ data_ = calloc(PATH_MAX + 1, sizeof(char)); // NOLINT
}
bool PathBuffer::AddW(const wchar_t* name) {
@@ -195,6 +195,17 @@
}
+void DirectoryListingEntry::ResetLink() {
+ if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+ delete link_;
+ link_ = NULL;
+ }
+ if (parent_ != NULL) {
+ link_ = parent_->link_;
+ }
+}
+
+
static bool DeleteRecursively(PathBuffer* path);
diff --git a/runtime/bin/directory_linux.cc b/runtime/bin/directory_linux.cc
index f715604..88c6f7c 100644
--- a/runtime/bin/directory_linux.cc
+++ b/runtime/bin/directory_linux.cc
@@ -23,7 +23,7 @@
PathBuffer::PathBuffer() : length_(0) {
- data_ = new char[PATH_MAX + 1];
+ data_ = calloc(PATH_MAX + 1, sizeof(char)); // NOLINT
}
bool PathBuffer::AddW(const wchar_t* name) {
@@ -195,6 +195,17 @@
}
+void DirectoryListingEntry::ResetLink() {
+ if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+ delete link_;
+ link_ = NULL;
+ }
+ if (parent_ != NULL) {
+ link_ = parent_->link_;
+ }
+}
+
+
static bool DeleteRecursively(PathBuffer* path);
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc
index 88e430b..08232d5 100644
--- a/runtime/bin/directory_macos.cc
+++ b/runtime/bin/directory_macos.cc
@@ -23,7 +23,7 @@
PathBuffer::PathBuffer() : length_(0) {
- data_ = new char[PATH_MAX + 1];
+ data_ = calloc(PATH_MAX + 1, sizeof(char)); // NOLINT
}
bool PathBuffer::AddW(const wchar_t* name) {
@@ -195,6 +195,17 @@
}
+void DirectoryListingEntry::ResetLink() {
+ if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+ delete link_;
+ link_ = NULL;
+ }
+ if (parent_ != NULL) {
+ link_ = parent_->link_;
+ }
+}
+
+
static bool DeleteRecursively(PathBuffer* path);
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc
index 9e3cf30..22c7a3a 100644
--- a/runtime/bin/directory_win.cc
+++ b/runtime/bin/directory_win.cc
@@ -20,7 +20,7 @@
namespace bin {
PathBuffer::PathBuffer() : length_(0) {
- data_ = new wchar_t[MAX_PATH + 1];
+ data_ = calloc(MAX_PATH + 1, sizeof(wchar_t)); // NOLINT
}
char* PathBuffer::AsString() const {
@@ -214,6 +214,17 @@
}
+void DirectoryListingEntry::ResetLink() {
+ if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+ delete link_;
+ link_ = NULL;
+ }
+ if (parent_ != NULL) {
+ link_ = parent_->link_;
+ }
+}
+
+
static bool DeleteFile(wchar_t* file_name, PathBuffer* path) {
if (!path->AddW(file_name)) return false;
diff --git a/tools/VERSION b/tools/VERSION
index 9715532..1f38ac9 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
MAJOR 0
MINOR 5
BUILD 20
-PATCH 0
+PATCH 1