Revision: 20268
Author:   [email protected]
Date:     Wed Mar 26 10:14:04 2014 UTC
Log:      Promise constructor should not be enumerable.

Promise should not be enumerable in the global object.

BUG=352597
[email protected]
LOG=Y

Review URL: https://codereview.chromium.org/211943004

Patch from Yutaka Hirano <[email protected]>.
http://code.google.com/p/v8/source/detail?r=20268

Modified:
 /branches/bleeding_edge/src/promise.js

=======================================
--- /branches/bleeding_edge/src/promise.js      Tue Mar 25 10:57:52 2014 UTC
+++ /branches/bleeding_edge/src/promise.js      Wed Mar 26 10:14:04 2014 UTC
@@ -306,9 +306,8 @@
 //-------------------------------------------------------------------

 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,

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to