Commit bdc7b2f4 authored by yangguo's avatar yangguo Committed by Commit bot

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.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26992}
parent 4686448a
......@@ -2894,10 +2894,9 @@ Genesis::Genesis(Isolate* isolate,
// Install experimental natives. Do not include them into the snapshot as we
// should be able to turn them off at runtime. Re-installing them after
// they have already been deserialized would also fail.
if (!isolate->serializer_enabled()) {
if (!InstallExperimentalNatives()) return;
InitializeExperimentalGlobal();
}
if (!isolate->serializer_enabled() && !InstallExperimentalNatives()) return;
InitializeExperimentalGlobal();
// The serializer cannot serialize typed arrays. Reset those typed arrays
// for each new context.
......
......@@ -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);
......
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