diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-12-04 22:11:58 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-12-17 06:25:26 -0500 |
commit | f87b1b8850d97eb7c9c9e5adb31594251a934441 (patch) | |
tree | f9bc4892add8ab7127017e533e3a13523d1f2699 /js/src/vm/AsyncFunction.cpp | |
parent | f5fa6cfea7dbd02dd690ac030157c4c94ba7ce63 (diff) | |
download | UXP-f87b1b8850d97eb7c9c9e5adb31594251a934441.tar UXP-f87b1b8850d97eb7c9c9e5adb31594251a934441.tar.gz UXP-f87b1b8850d97eb7c9c9e5adb31594251a934441.tar.lz UXP-f87b1b8850d97eb7c9c9e5adb31594251a934441.tar.xz UXP-f87b1b8850d97eb7c9c9e5adb31594251a934441.zip |
Bug 1317389: Change property attributes for generator and async functions to match ES2015/2017.
Tag #1287
Diffstat (limited to 'js/src/vm/AsyncFunction.cpp')
-rw-r--r-- | js/src/vm/AsyncFunction.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/vm/AsyncFunction.cpp b/js/src/vm/AsyncFunction.cpp index 2bcec5465..7132ed984 100644 --- a/js/src/vm/AsyncFunction.cpp +++ b/js/src/vm/AsyncFunction.cpp @@ -40,8 +40,11 @@ GlobalObject::initAsyncFunction(JSContext* cx, Handle<GlobalObject*> global) proto)); if (!asyncFunction) return false; - if (!LinkConstructorAndPrototype(cx, asyncFunction, asyncFunctionProto)) + if (!LinkConstructorAndPrototype(cx, asyncFunction, asyncFunctionProto, + JSPROP_PERMANENT | JSPROP_READONLY, JSPROP_READONLY)) + { return false; + } global->setReservedSlot(ASYNC_FUNCTION, ObjectValue(*asyncFunction)); global->setReservedSlot(ASYNC_FUNCTION_PROTO, ObjectValue(*asyncFunctionProto)); |