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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 1140263005: Revert "Hide Isolate pointer from embedder" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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/bin/dbg_message.h ('k') | runtime/bin/io_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index b67cdbf58e49d81ad52ca3f414dd3743e491faf6..b55575da3a741af6c2f7a35aaf11c711f8b94d8b 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 != DART_ILLEGAL_ISOLATE);
+ ASSERT(isolate != NULL);
snapshotted_isolate_ = Dart_CurrentIsolate();
Dart_ExitIsolate();
Dart_EnterIsolate(isolate);
@@ -179,7 +179,7 @@ class UriResolverIsolateScope {
}
~UriResolverIsolateScope() {
- ASSERT(snapshotted_isolate_ != DART_ILLEGAL_ISOLATE);
+ ASSERT(snapshotted_isolate_ != NULL);
Dart_ExitScope();
Dart_ExitIsolate();
Dart_EnterIsolate(snapshotted_isolate_);
@@ -193,7 +193,7 @@ class UriResolverIsolateScope {
DISALLOW_COPY_AND_ASSIGN(UriResolverIsolateScope);
};
-Dart_Isolate UriResolverIsolateScope::isolate = DART_ILLEGAL_ISOLATE;
+Dart_Isolate UriResolverIsolateScope::isolate = NULL;
static Dart_Handle ResolveUriInWorkingDirectory(const char* script_uri) {
@@ -552,7 +552,7 @@ int main(int argc, char** argv) {
char* error;
Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
- if (isolate == DART_ILLEGAL_ISOLATE) {
+ if (isolate == NULL) {
Log::PrintErr("Error: %s", error);
free(error);
exit(255);
@@ -597,8 +597,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) == DART_ILLEGAL_ISOLATE) {
+ if (Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error) == NULL) {
fprintf(stderr, "%s", error);
free(error);
exit(255);
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/bin/io_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698