diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-07 10:39:40 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-07 10:39:40 +0100 |
commit | 88db0108b14d58cf5d82ed7346f48f010feaaf0d (patch) | |
tree | 1d78ae8cd21d7d17293f66c166ca44718501d4aa /js/src/jsapi.h | |
parent | 8db772d2ca44ff44f32d434e7f62acba289b4155 (diff) | |
download | uxp-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar.gz |
Align `instanceof` with the final ES6 spec.
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r-- | js/src/jsapi.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 799396a0af..005d2278e4 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -2154,6 +2154,13 @@ namespace JS { extern JS_PUBLIC_API(bool) OrdinaryHasInstance(JSContext* cx, HandleObject objArg, HandleValue v, bool* bp); +// Implementation of +// https://www.ecma-international.org/ecma-262/6.0/#sec-instanceofoperator +// This is almost identical to JS_HasInstance, except the latter may call a +// custom hasInstance class op instead of InstanceofOperator. +extern JS_PUBLIC_API(bool) +InstanceofOperator(JSContext* cx, HandleObject obj, HandleValue v, bool* bp); + } // namespace JS extern JS_PUBLIC_API(void*) |