diff options
author | Job Bautista <jobbautista9@protonmail.com> | 2022-07-25 14:07:36 +0800 |
---|---|---|
committer | Job Bautista <jobbautista9@protonmail.com> | 2022-07-25 14:07:36 +0800 |
commit | 824c2f0d4012f8e718dcca5c3db9b796a7530008 (patch) | |
tree | af2af37f56790bd99566c5566fafef3ec6b266de /js/src/vm/GlobalObject.h | |
parent | 6542ca6bcdf836ee1fb82b75d77adb0e9604b97b (diff) | |
download | uxp-824c2f0d4012f8e718dcca5c3db9b796a7530008.tar.gz |
Issue #1969 - Implement Intl.RelativeTimeFormat.
Based on Mozilla bugs 1270140, 1504656, 1483545, and 1504334.
Took note of Mozilla bug 1379222 which changed GetPrototypeFromCallableConstructor
to GetPrototypeFromBuiltinConstructor.
There are many other changes I did myself since the initial implementation by
Mozilla wouldn't work with this codebase.
Diffstat (limited to 'js/src/vm/GlobalObject.h')
-rw-r--r-- | js/src/vm/GlobalObject.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index f9c0149f12..2e1b6ce87b 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -110,6 +110,7 @@ class GlobalObject : public NativeObject NUMBER_FORMAT_PROTO, DATE_TIME_FORMAT_PROTO, PLURAL_RULES_PROTO, + RELATIVE_TIME_FORMAT_PROTO, MODULE_PROTO, IMPORT_ENTRY_PROTO, EXPORT_ENTRY_PROTO, @@ -513,6 +514,11 @@ class GlobalObject : public NativeObject return getOrCreateObject(cx, global, PLURAL_RULES_PROTO, initIntlObject); } + static JSObject* + getOrCreateRelativeTimeFormatPrototype(JSContext* cx, Handle<GlobalObject*> global) { + return getOrCreateObject(cx, global, RELATIVE_TIME_FORMAT_PROTO, initIntlObject); + } + static bool ensureModulePrototypesCreated(JSContext *cx, Handle<GlobalObject*> global); JSObject* maybeGetModulePrototype() { |