devtools: check if impl is not null before use

This commit is contained in:
roytam1 2023-11-30 11:08:32 +08:00
commit 759506c751

View file

@ -310,7 +310,7 @@ NetworkResponseListener.prototype = {
} }
try { try {
let impl = this._wrappedNotificationCallbacks.getInterface(iid); let impl = this._wrappedNotificationCallbacks.getInterface(iid);
impl[method].apply(impl, args); if(impl) impl[method].apply(impl, args);
} catch (e) { } catch (e) {
if (e.result != Cr.NS_ERROR_NO_INTERFACE) { if (e.result != Cr.NS_ERROR_NO_INTERFACE) {
throw e; throw e;