Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/bootstrapper.cc

Issue 1511893002: Fix Promise intrinsicDefaultProto (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 // Set up the Promise constructor. 2485 // Set up the Promise constructor.
2486 { 2486 {
2487 Handle<String> key = factory()->Promise_string(); 2487 Handle<String> key = factory()->Promise_string();
2488 Handle<JSFunction> function = Handle<JSFunction>::cast( 2488 Handle<JSFunction> function = Handle<JSFunction>::cast(
2489 Object::GetProperty(handle(native_context()->global_object()), key) 2489 Object::GetProperty(handle(native_context()->global_object()), key)
2490 .ToHandleChecked()); 2490 .ToHandleChecked());
2491 JSFunction::EnsureHasInitialMap(function); 2491 JSFunction::EnsureHasInitialMap(function);
2492 function->initial_map()->set_instance_type(JS_PROMISE_TYPE); 2492 function->initial_map()->set_instance_type(JS_PROMISE_TYPE);
2493 function->shared()->set_construct_stub( 2493 function->shared()->set_construct_stub(
2494 *isolate()->builtins()->JSBuiltinsConstructStub()); 2494 *isolate()->builtins()->JSBuiltinsConstructStub());
2495 InstallWithIntrinsicDefaultProto(isolate(), function,
2496 Context::PROMISE_FUNCTION_INDEX);
2495 } 2497 }
2496 2498
2497 InstallBuiltinFunctionIds(); 2499 InstallBuiltinFunctionIds();
2498 2500
2499 // Create a constructor for RegExp results (a variant of Array that 2501 // Create a constructor for RegExp results (a variant of Array that
2500 // predefines the two properties index and match). 2502 // predefines the two properties index and match).
2501 { 2503 {
2502 // RegExpResult initial map. 2504 // RegExpResult initial map.
2503 2505
2504 // Find global.Array.prototype to inherit from. 2506 // Find global.Array.prototype to inherit from.
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
3289 } 3291 }
3290 3292
3291 3293
3292 // Called when the top-level V8 mutex is destroyed. 3294 // Called when the top-level V8 mutex is destroyed.
3293 void Bootstrapper::FreeThreadResources() { 3295 void Bootstrapper::FreeThreadResources() {
3294 DCHECK(!IsActive()); 3296 DCHECK(!IsActive());
3295 } 3297 }
3296 3298
3297 } // namespace internal 3299 } // namespace internal
3298 } // namespace v8 3300 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698