|
@@ -188,19 +188,10 @@ WebRunnerCommandLineHandler.prototype = {
|
|
|
|
|
|
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
|
|
|
|
|
|
- if (callback.value) {
|
|
|
- // Invoke the callback and don't load a new page
|
|
|
- callback.value.handleURI(url);
|
|
|
-
|
|
|
- aCmdLine.preventDefault = true;
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
if (url) {
|
|
|
var uriFixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup);
|
|
|
newURI = uriFixup.createFixupURI(url, Ci.nsIURIFixup.FIXUP_FLAG_NONE);
|
|
|
|
|
|
-
|
|
|
var win;
|
|
|
// Check if a window exists with the given url
|
|
|
var enumerator = wm.getEnumerator("navigator:browser");
|
|
@@ -220,6 +211,14 @@ WebRunnerCommandLineHandler.prototype = {
|
|
|
|
|
|
this.activateWindow(win);
|
|
|
|
|
|
+ if (callback.value) {
|
|
|
+ // Invoke the callback and don't load a new page
|
|
|
+ callback.value.handleURI(url);
|
|
|
+
|
|
|
+ aCmdLine.preventDefault = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (url) {
|
|
|
WebAppProperties.uri = url;
|
|
|
}
|