summaryrefslogtreecommitdiff
path: root/js/src/vm/GlobalObject.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-05-30 21:14:43 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-05-30 21:14:43 +0200
commite5dd97fee34bcd45599b8d2a11e39708857e7868 (patch)
tree1476a49c647d6febd7b62343ce1988faf29b3a21 /js/src/vm/GlobalObject.h
parent1cecef624a000983b0e380aa8723056c92f9f4f2 (diff)
downloaduxp-e5dd97fee34bcd45599b8d2a11e39708857e7868.tar.gz
Issue #1570 - Implement globalThis
This resolves #1570
Diffstat (limited to 'js/src/vm/GlobalObject.h')
-rw-r--r--js/src/vm/GlobalObject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h
index 3fd2762f84..720f63e698 100644
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -121,6 +121,7 @@ class GlobalObject : public NativeObject
FOR_OF_PIC_CHAIN,
MODULE_RESOLVE_HOOK,
WINDOW_PROXY,
+ GLOBAL_THIS_RESOLVED,
/* Total reserved-slot count for global objects. */
RESERVED_SLOTS
@@ -171,6 +172,8 @@ class GlobalObject : public NativeObject
static bool initBuiltinConstructor(JSContext* cx, Handle<GlobalObject*> global,
JSProtoKey key, HandleObject ctor, HandleObject proto);
+ static bool maybeResolveGlobalThis(JSContext* cx, Handle<GlobalObject*> global, bool* resolved);
+
void setConstructor(JSProtoKey key, const Value& v) {
MOZ_ASSERT(key <= JSProto_LIMIT);
setSlot(APPLICATION_SLOTS + key, v);