mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1058033 - Fix 'window is null' error on toolbox open in paintflashing.js. r=harth
This commit is contained in:
parent
739ba46aad
commit
68f9edf635
@ -102,10 +102,14 @@ exports.items = [
|
||||
state: {
|
||||
isChecked: function(aTarget) {
|
||||
if (aTarget.isLocalTab) {
|
||||
let isChecked = false;
|
||||
let window = aTarget.tab.linkedBrowser.contentWindow;
|
||||
let wUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
return wUtils.paintFlashing;
|
||||
if (window) {
|
||||
let wUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
isChecked = wUtils.paintFlashing;
|
||||
}
|
||||
return isChecked;
|
||||
} else {
|
||||
throw new Error("Unsupported target");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user