summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-02-07 10:39:40 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-02-07 10:39:40 +0100
commit88db0108b14d58cf5d82ed7346f48f010feaaf0d (patch)
tree1d78ae8cd21d7d17293f66c166ca44718501d4aa /js/src/jsapi.h
parent8db772d2ca44ff44f32d434e7f62acba289b4155 (diff)
downloadUXP-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar
UXP-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar.gz
UXP-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar.lz
UXP-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar.xz
UXP-88db0108b14d58cf5d82ed7346f48f010feaaf0d.zip
Align `instanceof` with the final ES6 spec.
Diffstat (limited to 'js/src/jsapi.h')
-rw-r--r--js/src/jsapi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index 799396a0a..005d2278e 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*)