зеркало из https://github.com/mozilla/gecko-dev.git
Bug 523216. Check for NULL message in NPN_SetException. r=joshmoz
This commit is contained in:
Родитель
ef7987072d
Коммит
6caac7613e
|
@ -1791,6 +1791,8 @@ _setexception(NPObject* npobj, const NPUTF8 *message)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!message) return;
|
||||
|
||||
if (gNPPException) {
|
||||
// If a plugin throws multiple exceptions, we'll only report the
|
||||
// last one for now.
|
||||
|
|
|
@ -39,6 +39,16 @@
|
|||
is(e, "second exception", "wrong exception thrown");
|
||||
}
|
||||
|
||||
// test calling exception with NULL message
|
||||
plugin.throwExceptionNextInvoke();
|
||||
try {
|
||||
plugin();
|
||||
ok(false, "exception not thrown");
|
||||
}
|
||||
catch (e) {
|
||||
is(e.message, "Error calling method on NPObject!", "wrong exception thrown");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче