| Index: src/runtime/runtime-literals.cc
|
| diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc
|
| index 8bbe0eeddb0da455bc92903e026a81a558e11b4c..83a2fcf45f7e30aff887225bb387395d89272cf7 100644
|
| --- a/src/runtime/runtime-literals.cc
|
| +++ b/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;
|
|
|