зеркало из https://github.com/mozilla/gecko-dev.git
Unwrap the target before checking for callability, so that wrappers don't wrongly appear to be callable. r=orange
This commit is contained in:
Родитель
ebb1f3feb3
Коммит
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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче