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

Unified Diff: runtime/bin/gen_snapshot.cc

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
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index be575c180a55201cab60636c5b7e418d5c1e822a..c4761dcb2236c7207e238ddf4c852a096a0fc145 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -171,7 +171,7 @@ static void WriteSnapshotFile(const char* filename,
class UriResolverIsolateScope {
public:
UriResolverIsolateScope() {
- ASSERT(isolate != NULL);
+ ASSERT(isolate != ILLEGAL_ISOLATE);
snapshotted_isolate_ = Dart_CurrentIsolate();
Dart_ExitIsolate();
Dart_EnterIsolate(isolate);
@@ -179,7 +179,7 @@ class UriResolverIsolateScope {
}
~UriResolverIsolateScope() {
- ASSERT(snapshotted_isolate_ != NULL);
+ ASSERT(snapshotted_isolate_ != ILLEGAL_ISOLATE);
Dart_ExitScope();
Dart_ExitIsolate();
Dart_EnterIsolate(snapshotted_isolate_);
@@ -193,7 +193,7 @@ class UriResolverIsolateScope {
DISALLOW_COPY_AND_ASSIGN(UriResolverIsolateScope);
};
-Dart_Isolate UriResolverIsolateScope::isolate = NULL;
+Dart_Isolate UriResolverIsolateScope::isolate = ILLEGAL_ISOLATE;
static Dart_Handle ResolveScriptUri(const char* script_uri) {
@@ -551,7 +551,7 @@ int main(int argc, char** argv) {
char* error;
Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
- if (isolate == NULL) {
+ if (isolate == ILLEGAL_ISOLATE) {
Log::PrintErr("Error: %s", error);
free(error);
exit(255);
@@ -593,7 +593,7 @@ int main(int argc, char** argv) {
// Now we create an isolate into which we load all the code that needs to
// be in the snapshot.
- if (Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error) == NULL) {
+ if (Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error) == ILLEGAL_ISOLATE) {
fprintf(stderr, "%s", error);
free(error);
exit(255);
« no previous file with comments | « runtime/bin/dbg_connection.cc ('k') | runtime/bin/main.cc » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698