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

Serializer: reset typed array cell type.

R=mvstanton@chromium.org
BUG=chromium:449937
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26133}
parent 02218adb
...@@ -2810,9 +2810,13 @@ Genesis::Genesis(Isolate* isolate, ...@@ -2810,9 +2810,13 @@ Genesis::Genesis(Isolate* isolate,
Utils::OpenHandle(*buffer)->set_should_be_freed(true); Utils::OpenHandle(*buffer)->set_should_be_freed(true);
v8::Local<v8::Uint32Array> ta = v8::Uint32Array::New(buffer, 0, num_elems); v8::Local<v8::Uint32Array> ta = v8::Uint32Array::New(buffer, 0, num_elems);
Handle<JSBuiltinsObject> builtins(native_context()->builtins()); Handle<JSBuiltinsObject> builtins(native_context()->builtins());
Runtime::DefineObjectProperty(builtins, factory()->InternalizeOneByteString(
STATIC_CHAR_VECTOR("rngstate")), Handle<String> rngstate =
Utils::OpenHandle(*ta), NONE).Assert(); factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("rngstate"));
// Reset property cell type before (re)initializing.
JSBuiltinsObject::InvalidatePropertyCell(builtins, rngstate);
JSObject::SetOwnPropertyIgnoreAttributes(
builtins, rngstate, Utils::OpenHandle(*ta), DONT_DELETE).Assert();
// Initialize trigonometric lookup tables and constants. // Initialize trigonometric lookup tables and constants.
const int constants_size = arraysize(fdlibm::MathConstants::constants); const int constants_size = arraysize(fdlibm::MathConstants::constants);
...@@ -2823,10 +2827,12 @@ Genesis::Genesis(Isolate* isolate, ...@@ -2823,10 +2827,12 @@ Genesis::Genesis(Isolate* isolate,
v8::Local<v8::Float64Array> trig_table = v8::Local<v8::Float64Array> trig_table =
v8::Float64Array::New(trig_buffer, 0, constants_size); v8::Float64Array::New(trig_buffer, 0, constants_size);
Runtime::DefineObjectProperty( Handle<String> kmath =
builtins, factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("kMath"));
factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("kMath")), // Reset property cell type before (re)initializing.
Utils::OpenHandle(*trig_table), NONE).Assert(); JSBuiltinsObject::InvalidatePropertyCell(builtins, kmath);
JSObject::SetOwnPropertyIgnoreAttributes(
builtins, kmath, Utils::OpenHandle(*trig_table), DONT_DELETE).Assert();
} }
result_ = native_context(); result_ = native_context();
......
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