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

Unified Diff: src/bootstrapper.cc

Issue 2554013002: Revert of Create JSPromise (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 47d7eb83ba393c90257bce7755e19dcbd2bca278..98f709c4f4b8987013d74a08c51528a7701e38d2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1795,9 +1795,9 @@
Handle<JSObject> prototype =
factory->NewJSObject(isolate->object_function(), TENURED);
- Handle<JSFunction> promise_fun =
- InstallFunction(global, "Promise", JS_PROMISE_TYPE, JSPromise::kSize,
- prototype, Builtins::kPromiseConstructor);
+ Handle<JSFunction> promise_fun = InstallFunction(
+ global, "Promise", JS_PROMISE_TYPE, JSObject::kHeaderSize, prototype,
+ Builtins::kPromiseConstructor);
InstallWithIntrinsicDefaultProto(isolate, promise_fun,
Context::PROMISE_FUNCTION_INDEX);
@@ -1815,9 +1815,6 @@
JSObject::AddProperty(
prototype, factory->to_string_tag_symbol(), factory->Promise_string(),
static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY));
-
- SimpleInstallFunction(prototype, "then", Builtins::kPromiseThen, 2, true,
- DONT_ENUM);
{ // Internal: PromiseInternalConstructor
Handle<JSFunction> function =
@@ -1827,27 +1824,11 @@
isolate, function, Context::PROMISE_INTERNAL_CONSTRUCTOR_INDEX);
}
- { // Internal: PromiseCreateAndSet
- Handle<JSFunction> function =
- SimpleCreateFunction(isolate, factory->empty_string(),
- Builtins::kPromiseCreateAndSet, 2, false);
- InstallWithIntrinsicDefaultProto(isolate, function,
- Context::PROMISE_CREATE_AND_SET_INDEX);
- }
-
{ // Internal: IsPromise
Handle<JSFunction> function = SimpleCreateFunction(
isolate, factory->empty_string(), Builtins::kIsPromise, 1, false);
InstallWithIntrinsicDefaultProto(isolate, function,
Context::IS_PROMISE_INDEX);
- }
-
- { // Internal: PerformPromiseThen
- Handle<JSFunction> function =
- SimpleCreateFunction(isolate, factory->empty_string(),
- Builtins::kPerformPromiseThen, 4, false);
- InstallWithIntrinsicDefaultProto(isolate, function,
- Context::PERFORM_PROMISE_THEN_INDEX);
}
{
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698