зеркало из https://github.com/mozilla/gecko-dev.git
Use ScriptRuntime.notAFunction to report bad ScriptableObject.callMethod arguments
This commit is contained in:
Родитель
1cf362f6fe
Коммит
81e82296c8
|
@ -1526,9 +1526,7 @@ public abstract class ScriptableObject implements Scriptable, Serializable,
|
|||
{
|
||||
Object funObj = getProperty(obj, methodName);
|
||||
if (!(funObj instanceof Function)) {
|
||||
throw ScriptRuntime.typeError1(
|
||||
"msg.isnt.function",
|
||||
ScriptRuntime.toString(obj)+'.'+methodName);
|
||||
throw ScriptRuntime.notFunctionError(obj, methodName);
|
||||
}
|
||||
Function fun = (Function)funObj;
|
||||
return fun.call(cx, getTopLevelScope(obj), obj, args);
|
||||
|
|
Загрузка…
Ссылка в новой задаче