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

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..a22c46e4744b9746041c9e89ec14647be9e62bcc 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -308,7 +308,11 @@ function PromiseOne(values) {
function SetUpPromise() {
%CheckIsBootstrapping()
var global_receiver = %GlobalReceiver(global);
- global_receiver.Promise = $Promise;
+ $Object.defineProperty(global_receiver, 'Promise', {
rossberg 2014/03/26 09:59:37 You can use %SetProperty directly, like I did in t
yhirano 2014/03/26 10:09:12 Thanks, done.
+ value: $Promise,
+ writable: true,
+ configurable: true
+ });
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