mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 15:55:16 +00:00
Bug 340233 -inspector produces unsizable window r=timeless
This commit is contained in:
parent
b19aadfc37
commit
db7888b79e
@ -79,28 +79,31 @@ InspectorCmdLineHandler.prototype =
|
|||||||
|
|
||||||
/* nsICommandLineHandler */
|
/* nsICommandLineHandler */
|
||||||
handle : function handler_handle(cmdLine) {
|
handle : function handler_handle(cmdLine) {
|
||||||
var args;
|
var args = Components.classes["@mozilla.org/supports-string;1"]
|
||||||
try {
|
|
||||||
var uristr = cmdLine.handleFlagWithParam("inspect", false);
|
|
||||||
if (uristr) {
|
|
||||||
var uri = cmdLine.resolveURI(uristr);
|
|
||||||
args = Components.classes["@mozilla.org/supports-string;1"]
|
|
||||||
.createInstance(nsISupportsString);
|
.createInstance(nsISupportsString);
|
||||||
args.data = uri.spec;
|
try {
|
||||||
|
var uristr = cmdLine.handleFlagWithParam("inspector", false);
|
||||||
|
if (uristr == null)
|
||||||
|
return;
|
||||||
|
try {
|
||||||
|
args.data = cmdLine.resolveURI(uristr).spec;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
cmdLine.handleFlag("inspector", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args || cmdLine.handleFlag("inspector", false)) {
|
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
.getService(nsIWindowWatcher);
|
||||||
.getService(nsIWindowWatcher);
|
wwatch.openWindow(null, "chrome://inspector/content/", "_blank",
|
||||||
wwatch.openWindow(null, "chrome://inspector/content/", "_blank",
|
"chrome,dialog=no,all", args);
|
||||||
"chrome,dialog=no,all", args);
|
cmdLine.preventDefault = true;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
helpInfo : " -inspect <url> Open the URL in the DOM inspector.\n -inspector Open the DOM inspector.\n"
|
helpInfo : " -inspector <url> Open the DOM inspector.\n"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user