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}
// 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.
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);