diff options
Diffstat (limited to 'deps/v8/src/runtime/runtime-literals.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-literals.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/deps/v8/src/runtime/runtime-literals.cc b/deps/v8/src/runtime/runtime-literals.cc index 1ea9c81968..76226d68f5 100644 --- a/deps/v8/src/runtime/runtime-literals.cc +++ b/deps/v8/src/runtime/runtime-literals.cc @@ -42,14 +42,7 @@ MUST_USE_RESULT static MaybeHandle<Object> CreateObjectLiteralBoilerplate( Isolate* isolate, Handle<FixedArray> literals, Handle<FixedArray> constant_properties, bool should_have_fast_elements, bool has_function_literal) { - // Get the native context from the literals array. This is the - // context in which the function was created and we use the object - // function from this context to create the object literal. We do - // not use the object function from the current native context - // because this might be the object function from another context - // which we should not have access to. - Handle<Context> context = - Handle<Context>(JSFunction::NativeContextFromLiterals(*literals)); + Handle<Context> context = isolate->native_context(); // In case we have function literals, we want the object to be in // slow properties mode for now. We don't go in the map cache because @@ -146,8 +139,7 @@ MaybeHandle<Object> Runtime::CreateArrayLiteralBoilerplate( Isolate* isolate, Handle<FixedArray> literals, Handle<FixedArray> elements) { // Create the JSArray. - Handle<JSFunction> constructor( - JSFunction::NativeContextFromLiterals(*literals)->array_function()); + Handle<JSFunction> constructor = isolate->array_function(); PretenureFlag pretenure_flag = isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED; |