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/proxy | |
parent | 8db772d2ca44ff44f32d434e7f62acba289b4155 (diff) | |
download | uxp-88db0108b14d58cf5d82ed7346f48f010feaaf0d.tar.gz |
Align `instanceof` with the final ES6 spec.
Diffstat (limited to 'js/src/proxy')
-rw-r--r-- | js/src/proxy/OpaqueCrossCompartmentWrapper.cpp | 8 | ||||
-rw-r--r-- | js/src/proxy/ScriptedProxyHandler.cpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp b/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp index ff3f4145cc..02bf237ff2 100644 --- a/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp +++ b/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp @@ -175,6 +175,14 @@ OpaqueCrossCompartmentWrapper::isArray(JSContext* cx, HandleObject obj, return true; } +bool OpaqueCrossCompartmentWrapper::hasInstance(JSContext* cx, + HandleObject wrapper, + MutableHandleValue v, + bool* bp) const { + *bp = false; + return true; +} + const char* OpaqueCrossCompartmentWrapper::className(JSContext* cx, HandleObject proxy) const diff --git a/js/src/proxy/ScriptedProxyHandler.cpp b/js/src/proxy/ScriptedProxyHandler.cpp index 7765473371..0e25f470c0 100644 --- a/js/src/proxy/ScriptedProxyHandler.cpp +++ b/js/src/proxy/ScriptedProxyHandler.cpp @@ -8,8 +8,6 @@ #include "jsapi.h" -#include "vm/Interpreter.h" // For InstanceOfOperator - #include "jsobjinlines.h" #include "vm/NativeObject-inl.h" @@ -1230,7 +1228,7 @@ bool ScriptedProxyHandler::hasInstance(JSContext* cx, HandleObject proxy, MutableHandleValue v, bool* bp) const { - return InstanceOfOperator(cx, proxy, v, bp); + return InstanceofOperator(cx, proxy, v, bp); } bool |