Reviewers: vogelheim,

Description:
Serializer: still install experimental globals when creating a snapshot.

Experimental globals are simply flag values on the builtins object to
turn on/off harmony features. We still need to declare them even when
we don't turn on harmony features for the snapshot.

[email protected]

Please review this at https://codereview.chromium.org/978813002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+4, -2 lines):
  M src/bootstrapper.cc
  M test/cctest/test-serialize.cc


Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 960406d59ad6726b3bb4f3f4cc0dea541d8b1d6f..7a040bc7d3d171b7f29520bf5e8311b6609b1f43 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2896,9 +2896,10 @@ Genesis::Genesis(Isolate* isolate,
   // they have already been deserialized would also fail.
   if (!isolate->serializer_enabled()) {
     if (!InstallExperimentalNatives()) return;
-    InitializeExperimentalGlobal();
   }

+  InitializeExperimentalGlobal();
+
   // The serializer cannot serialize typed arrays. Reset those typed arrays
   // for each new context.
   InitializeBuiltinTypedArrays();
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index e16be9775c582d925ec5c6c6e43fe116c46672f4..49bc06433cbca78cb2dfac69cd327c35eac7f43f 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -709,7 +709,8 @@ TEST(PerIsolateSnapshotBlobs) {
   const char* source1 = "function f() { return 42; }";
   const char* source2 =
       "function f() { return g() * 2; }"
-      "function g() { return 43; }";
+      "function g() { return 43; }"
+      "/./.test('a')";

   v8::StartupData data1 = v8::V8::CreateSnapshotDataBlob(source1);
   v8::StartupData data2 = v8::V8::CreateSnapshotDataBlob(source2);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to