mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-25 01:01:52 +00:00
Bug 994659 - Fix exceptions when reloading shell.html. r=vingtetun
This commit is contained in:
parent
9982695b17
commit
9b31007e1d
@ -52,6 +52,10 @@ function checkDebuggerPort() {
|
||||
// DebuggerServer.openListener detects that it isn't a file path (string),
|
||||
// and starts listening on the tcp port given here as command line argument.
|
||||
|
||||
if (!window.arguments) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the command line arguments that were passed to the b2g client
|
||||
let args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
|
||||
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
let runAppObj;
|
||||
window.addEventListener('load', function() {
|
||||
if (!window.arguments) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the command line arguments that were passed to the b2g client
|
||||
let args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
|
||||
let appname;
|
||||
|
@ -57,12 +57,19 @@ window.addEventListener('ContentStart', function() {
|
||||
};
|
||||
|
||||
// Get the command line arguments that were passed to the b2g client
|
||||
let args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
|
||||
let screenarg;
|
||||
let args;
|
||||
try {
|
||||
// On Firefox Mulet, we don't always have a command line argument
|
||||
args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
|
||||
} catch(e) {}
|
||||
|
||||
let screenarg = null;
|
||||
|
||||
// Get the --screen argument from the command line
|
||||
try {
|
||||
screenarg = args.handleFlagWithParam('screen', false);
|
||||
if (args) {
|
||||
screenarg = args.handleFlagWithParam('screen', false);
|
||||
}
|
||||
|
||||
// If there isn't one, use the default screen
|
||||
if (screenarg === null)
|
||||
|
Loading…
Reference in New Issue
Block a user