mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-13 07:24:47 +00:00
Unwrap the target before checking for callability, so that wrappers don't wrongly appear to be callable. r=orange
This commit is contained in:
parent
ebb1f3feb3
commit
f14af88f11
@ -2575,7 +2575,7 @@ fun_bind(JSContext *cx, uintN argc, Value *vp)
|
||||
return false;
|
||||
|
||||
/* Step 2. */
|
||||
if (!target->isCallable()) {
|
||||
if (!target->wrappedObject(cx)->isCallable()) {
|
||||
if (JSString *str = js_ValueToString(cx, vp[1])) {
|
||||
if (const char *bytes = js_GetStringBytes(cx, str)) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user