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

Unified Diff: runtime/vm/benchmark_test.h

Issue 1130753006: Hide Isolate pointer from embedder (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/platform/globals.h ('k') | runtime/vm/custom_isolate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/benchmark_test.h
diff --git a/runtime/vm/benchmark_test.h b/runtime/vm/benchmark_test.h
index b26a13985aa74ea2f3085868eefe01b56f5c49c6..fd5c39aab09457a7651a3c6de4693f937bff379f 100644
--- a/runtime/vm/benchmark_test.h
+++ b/runtime/vm/benchmark_test.h
@@ -8,6 +8,7 @@
#include "include/dart_api.h"
#include "vm/dart.h"
+#include "vm/dart_api_impl.h"
#include "vm/globals.h"
#include "vm/heap.h"
#include "vm/isolate.h"
@@ -77,12 +78,12 @@ class Benchmark {
const char* score_kind() const { return score_kind_; }
void set_score(int64_t value) { score_ = value; }
int64_t score() const { return score_; }
- Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
+ Isolate* isolate() const { return Api::CastIsolate(isolate_); }
Dart_Isolate CreateIsolate(const uint8_t* buffer) {
char* err = NULL;
isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err);
- EXPECT(isolate_ != NULL);
+ EXPECT(isolate_ != DART_ILLEGAL_ISOLATE);
free(err);
return isolate_;
}
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/custom_isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698