summaryrefslogtreecommitdiff
path: root/js/src/vm/GlobalObject.h
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/GlobalObject.h
parentf5fa6cfea7dbd02dd690ac030157c4c94ba7ce63 (diff)
downloaduxp-f87b1b8850d97eb7c9c9e5adb31594251a934441.tar.gz
Bug 1317389: Change property attributes for generator and async functions to match ES2015/2017.
Tag #1287
Diffstat (limited to 'js/src/vm/GlobalObject.h')
-rw-r--r--js/src/vm/GlobalObject.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h
index 9179abbb7d..dd3f231517 100644
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -985,12 +985,14 @@ GlobalObject::createArrayFromBuffer<uint8_clamped>() const
}
/*
- * Define ctor.prototype = proto as non-enumerable, non-configurable, and
- * non-writable; define proto.constructor = ctor as non-enumerable but
- * configurable and writable.
+ * Unless otherwise specified, define ctor.prototype = proto as non-enumerable,
+ * non-configurable, and non-writable; and define proto.constructor = ctor as
+ * non-enumerable but configurable and writable.
*/
extern bool
-LinkConstructorAndPrototype(JSContext* cx, JSObject* ctor, JSObject* proto);
+LinkConstructorAndPrototype(JSContext* cx, JSObject* ctor, JSObject* proto,
+ unsigned prototypeAttrs = JSPROP_PERMANENT | JSPROP_READONLY,
+ unsigned constructorAttrs = 0);
/*
* Define properties and/or functions on any object. Either ps or fs, or both,