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

Side by Side Diff: src/bootstrapper.cc

Issue 2575313002: [promisehook] Implement PromiseHook (Closed)
Patch Set: add tests Created 4 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
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/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 Handle<Map> prototype_map(prototype->map()); 1880 Handle<Map> prototype_map(prototype->map());
1881 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); 1881 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
1882 1882
1883 // Store the initial Promise.prototype map. This is used in fast-path 1883 // Store the initial Promise.prototype map. This is used in fast-path
1884 // checks. Do not alter the prototype after this point. 1884 // checks. Do not alter the prototype after this point.
1885 native_context()->set_promise_prototype_map(*prototype_map); 1885 native_context()->set_promise_prototype_map(*prototype_map);
1886 1886
1887 { // Internal: PromiseInternalConstructor 1887 { // Internal: PromiseInternalConstructor
1888 Handle<JSFunction> function = 1888 Handle<JSFunction> function =
1889 SimpleCreateFunction(isolate, factory->empty_string(), 1889 SimpleCreateFunction(isolate, factory->empty_string(),
1890 Builtins::kPromiseInternalConstructor, 0, false); 1890 Builtins::kPromiseInternalConstructor, 1, false);
1891 InstallWithIntrinsicDefaultProto( 1891 InstallWithIntrinsicDefaultProto(
1892 isolate, function, Context::PROMISE_INTERNAL_CONSTRUCTOR_INDEX); 1892 isolate, function, Context::PROMISE_INTERNAL_CONSTRUCTOR_INDEX);
1893 } 1893 }
1894 1894
1895 { // Internal: PromiseCreateAndSet 1895 { // Internal: PromiseCreateAndSet
1896 Handle<JSFunction> function = 1896 Handle<JSFunction> function =
1897 SimpleCreateFunction(isolate, factory->empty_string(), 1897 SimpleCreateFunction(isolate, factory->empty_string(),
1898 Builtins::kPromiseCreateAndSet, 2, false); 1898 Builtins::kPromiseCreateAndSet, 2, false);
1899 InstallWithIntrinsicDefaultProto(isolate, function, 1899 InstallWithIntrinsicDefaultProto(isolate, function,
1900 Context::PROMISE_CREATE_AND_SET_INDEX); 1900 Context::PROMISE_CREATE_AND_SET_INDEX);
(...skipping 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after
4684 } 4684 }
4685 4685
4686 4686
4687 // Called when the top-level V8 mutex is destroyed. 4687 // Called when the top-level V8 mutex is destroyed.
4688 void Bootstrapper::FreeThreadResources() { 4688 void Bootstrapper::FreeThreadResources() {
4689 DCHECK(!IsActive()); 4689 DCHECK(!IsActive());
4690 } 4690 }
4691 4691
4692 } // namespace internal 4692 } // namespace internal
4693 } // namespace v8 4693 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698