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

Unified Diff: src/promise.js

Issue 211943004: Promise constructor should not be enumerable. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: Created 6 years, 9 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/promise.js
diff --git a/src/promise.js b/src/promise.js
index 23e51259a36c43849002990ea2b3ebbb3c5c0105..9937f0ced70f32d9bb6fc162be8194e9712aa996 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -306,9 +306,8 @@ function PromiseOne(values) {
//-------------------------------------------------------------------
function SetUpPromise() {
- %CheckIsBootstrapping()
- var global_receiver = %GlobalReceiver(global);
- global_receiver.Promise = $Promise;
+ %CheckIsBootstrapping();
+ %SetProperty(global, 'Promise', $Promise, DONT_ENUM);
InstallFunctions($Promise, DONT_ENUM, [
"defer", PromiseDeferred,
"accept", PromiseResolved,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698