diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-26 13:37:09 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-26 13:37:09 +0100 |
commit | 185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c (patch) | |
tree | 9b83879173624e3dcb5ba6d1404fb89f2c47cb66 /js/src/vm/GlobalObject.h | |
parent | e8c40b0bc2aa25b9f85ddbe3949c296311cc0f3f (diff) | |
download | UXP-185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c.tar UXP-185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c.tar.gz UXP-185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c.tar.lz UXP-185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c.tar.xz UXP-185a9a750878ed1d9705fbd162dbfe9bf2e4ea0c.zip |
Issue #1302 - Add self-hosted implementation for string regex .matchAll
This resolves #1302.
Diffstat (limited to 'js/src/vm/GlobalObject.h')
-rw-r--r-- | js/src/vm/GlobalObject.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index 5aacfc5dc..9179abbb7 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -93,6 +93,7 @@ class GlobalObject : public NativeObject ITERATOR_PROTO, ARRAY_ITERATOR_PROTO, STRING_ITERATOR_PROTO, + REGEXP_STRING_ITERATOR_PROTO, LEGACY_GENERATOR_OBJECT_PROTO, STAR_GENERATOR_OBJECT_PROTO, STAR_GENERATOR_FUNCTION_PROTO, @@ -583,6 +584,12 @@ class GlobalObject : public NativeObject } static NativeObject* + getOrCreateRegExpStringIteratorPrototype(JSContext* cx, Handle<GlobalObject*> global) { + return MaybeNativeObject(getOrCreateObject(cx, global, REGEXP_STRING_ITERATOR_PROTO, + initRegExpStringIteratorProto)); + } + + static NativeObject* getOrCreateLegacyGeneratorObjectPrototype(JSContext* cx, Handle<GlobalObject*> global) { return MaybeNativeObject(getOrCreateObject(cx, global, LEGACY_GENERATOR_OBJECT_PROTO, initLegacyGeneratorProto)); @@ -767,6 +774,7 @@ class GlobalObject : public NativeObject static bool initIteratorProto(JSContext* cx, Handle<GlobalObject*> global); static bool initArrayIteratorProto(JSContext* cx, Handle<GlobalObject*> global); static bool initStringIteratorProto(JSContext* cx, Handle<GlobalObject*> global); + static bool initRegExpStringIteratorProto(JSContext* cx, Handle<GlobalObject*> global); // Implemented in vm/GeneratorObject.cpp. static bool initLegacyGeneratorProto(JSContext* cx, Handle<GlobalObject*> global); |