Index: src/mksnapshot.cc |
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc |
index 9e63555b5e218742eef9ad2eda52eac13bc2ebb3..156cd77c3e95bb7e4f7e3f1a1c0503a6fd8383d8 100644 |
--- a/src/mksnapshot.cc |
+++ b/src/mksnapshot.cc |
@@ -333,8 +333,9 @@ int main(int argc, char** argv) { |
exit(1); |
} |
#endif |
- i::Serializer::Enable(); |
Isolate* isolate = Isolate::GetCurrent(); |
+ i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ i::Serializer::Enable(internal_isolate); |
Persistent<Context> context; |
{ |
HandleScope handle_scope(isolate); |
@@ -391,7 +392,7 @@ int main(int argc, char** argv) { |
// Make sure all builtin scripts are cached. |
{ HandleScope scope(isolate); |
for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) { |
- i::Isolate::Current()->bootstrapper()->NativesSourceLookup(i); |
+ internal_isolate->bootstrapper()->NativesSourceLookup(i); |
} |
} |
// If we don't do this then we end up with a stray root pointing at the |
@@ -402,10 +403,11 @@ int main(int argc, char** argv) { |
CppByteSink sink(argv[1]); |
// This results in a somewhat smaller snapshot, probably because it gets rid |
// of some things that are cached between garbage collections. |
- i::StartupSerializer ser(&sink); |
+ i::StartupSerializer ser(internal_isolate, &sink); |
ser.SerializeStrongReferences(); |
- i::PartialSerializer partial_ser(&ser, sink.partial_sink()); |
+ i::PartialSerializer partial_ser( |
+ internal_isolate, &ser, sink.partial_sink()); |
partial_ser.Serialize(&raw_context); |
ser.SerializeWeakReferences(); |