From 95908dbb09ad3c2eda5545cb5caf02be59ac7f3f Mon Sep 17 00:00:00 2001 From: "rossberg@chromium.org" Date: Wed, 26 Mar 2014 10:14:04 +0000 Subject: [PATCH] Promise constructor should not be enumerable. Promise should not be enumerable in the global object. BUG=352597 R=rossberg@chromium.org LOG=Y Review URL: https://codereview.chromium.org/211943004 Patch from Yutaka Hirano . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/promise.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/promise.js b/src/promise.js index 23e5125..9937f0c 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, -- 2.7.4