From: rossberg@chromium.org Date: Wed, 26 Mar 2014 10:14:04 +0000 (+0000) Subject: Promise constructor should not be enumerable. X-Git-Tag: upstream/4.7.83~9996 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95908dbb09ad3c2eda5545cb5caf02be59ac7f3f;p=platform%2Fupstream%2Fv8.git 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 --- 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,