summaryrefslogtreecommitdiffstats
path: root/js/src/vm/AsyncFunction.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-04 22:11:58 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:26 -0500
commitf87b1b8850d97eb7c9c9e5adb31594251a934441 (patch)
treef9bc4892add8ab7127017e533e3a13523d1f2699 /js/src/vm/AsyncFunction.cpp
parentf5fa6cfea7dbd02dd690ac030157c4c94ba7ce63 (diff)
downloadUXP-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.cpp5
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));