Commit 44afd2a5 authored by dcarney@chromium.org's avatar dcarney@chromium.org

don't use default isolate in mksnapshot

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/24258006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f536eb16
...@@ -310,6 +310,7 @@ void DumpException(Handle<Message> message) { ...@@ -310,6 +310,7 @@ void DumpException(Handle<Message> message) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
V8::InitializeICU(); V8::InitializeICU();
i::Isolate::SetCrashIfDefaultIsolateInitialized();
// By default, log code create information in the snapshot. // By default, log code create information in the snapshot.
i::FLAG_log_code = true; i::FLAG_log_code = true;
...@@ -330,7 +331,10 @@ int main(int argc, char** argv) { ...@@ -330,7 +331,10 @@ int main(int argc, char** argv) {
exit(1); exit(1);
} }
#endif #endif
Isolate* isolate = Isolate::GetCurrent(); i::FLAG_logfile_per_isolate = false;
Isolate* isolate = v8::Isolate::New();
isolate->Enter();
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
i::Serializer::Enable(internal_isolate); i::Serializer::Enable(internal_isolate);
Persistent<Context> context; Persistent<Context> context;
......
...@@ -1284,7 +1284,6 @@ Serializer::Serializer(Isolate* isolate, SnapshotByteSink* sink) ...@@ -1284,7 +1284,6 @@ Serializer::Serializer(Isolate* isolate, SnapshotByteSink* sink)
root_index_wave_front_(0) { root_index_wave_front_(0) {
// The serializer is meant to be used only to generate initial heap images // The serializer is meant to be used only to generate initial heap images
// from a context in which there is only one isolate. // from a context in which there is only one isolate.
ASSERT(isolate_->IsDefaultIsolate());
for (int i = 0; i <= LAST_SPACE; i++) { for (int i = 0; i <= LAST_SPACE; i++) {
fullness_[i] = 0; fullness_[i] = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment