Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1323)

Unified Diff: runtime/vm/code_observers.cc

Issue 16378004: Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the darti… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_observers.cc
===================================================================
--- runtime/vm/code_observers.cc (revision 23640)
+++ runtime/vm/code_observers.cc (working copy)
@@ -4,7 +4,6 @@
#include "vm/code_observers.h"
-#include "platform/utils.h"
#include "vm/os.h"
namespace dart {
@@ -14,12 +13,12 @@
void CodeObservers::Register(CodeObserver* observer) {
- intptr_t new_length = observers_length_ + 1;
- observers_ = Utils::Realloc(observers_, observers_length_, new_length);
+ observers_length_++;
+ observers_ = reinterpret_cast<CodeObserver**>(
+ realloc(observers_, sizeof(observer) * observers_length_));
if (observers_ == NULL) {
FATAL("failed to grow code observers array");
}
- observers_length_ = new_length;
observers_[observers_length_ - 1] = observer;
}
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698