Commit c071af5a authored by dslomov's avatar dslomov Committed by Commit bot

Switch the order of experimental global initialization and running natives.

The order should match the one for normal natives.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27165}
parent 6b842874
...@@ -1706,10 +1706,9 @@ void Genesis::InitializeGlobal_harmony_regexps() { ...@@ -1706,10 +1706,9 @@ void Genesis::InitializeGlobal_harmony_regexps() {
Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
: heap()->false_value()); : heap()->false_value());
PropertyAttributes attributes = Runtime::SetObjectProperty(isolate(), builtins,
static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); factory()->harmony_regexps_string(), flag,
Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), STRICT).Assert();
flag, attributes).Assert();
} }
...@@ -1718,11 +1717,9 @@ void Genesis::InitializeGlobal_harmony_unicode_regexps() { ...@@ -1718,11 +1717,9 @@ void Genesis::InitializeGlobal_harmony_unicode_regexps() {
Handle<HeapObject> flag(FLAG_harmony_unicode_regexps ? heap()->true_value() Handle<HeapObject> flag(FLAG_harmony_unicode_regexps ? heap()->true_value()
: heap()->false_value()); : heap()->false_value());
PropertyAttributes attributes = Runtime::SetObjectProperty(isolate(), builtins,
static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); factory()->harmony_unicode_regexps_string(), flag,
Runtime::DefineObjectProperty(builtins, STRICT).Assert();
factory()->harmony_unicode_regexps_string(),
flag, attributes).Assert();
} }
...@@ -2890,9 +2887,10 @@ Genesis::Genesis(Isolate* isolate, ...@@ -2890,9 +2887,10 @@ Genesis::Genesis(Isolate* isolate,
// Install experimental natives. Do not include them into the snapshot as we // 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 // should be able to turn them off at runtime. Re-installing them after
// they have already been deserialized would also fail. // they have already been deserialized would also fail.
if (!isolate->serializer_enabled() && !InstallExperimentalNatives()) return; if (!isolate->serializer_enabled()) {
InitializeExperimentalGlobal();
InitializeExperimentalGlobal(); if (!InstallExperimentalNatives()) return;
}
// The serializer cannot serialize typed arrays. Reset those typed arrays // The serializer cannot serialize typed arrays. Reset those typed arrays
// for each new context. // for each new context.
......
...@@ -6,6 +6,8 @@ var $regexpExec; ...@@ -6,6 +6,8 @@ var $regexpExec;
var $regexpExecNoTests; var $regexpExecNoTests;
var $regexpLastMatchInfo; var $regexpLastMatchInfo;
var $regexpLastMatchInfoOverride; var $regexpLastMatchInfoOverride;
var harmony_regexps = false;
var harmony_unicode_regexps = false;
(function() { (function() {
......
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