merge m-c to fx-team
authorTim Taubert <ttaubert@mozilla.com>
Wed, 25 Jul 2012 09:28:29 +0200
changeset 100281 ef20925bc2a58472a7ef060abb608ce24b579972
parent 100276 5598b8c4f271ce3109b234581774788f3c7846c2 (current diff)
parent 100280 1e7d12a6583ee49982dd18b4d77b26f03c042625 (diff)
child 100282 345dc425c9ebfcdeffc255cc90b011715e8fa621
child 100404 10ffb8522a7c27253ce87ad55672b8130e4acac5
push id23173
push userttaubert@mozilla.com
push dateWed, 25 Jul 2012 07:28:57 +0000
treeherdermozilla-central@ef20925bc2a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone17.0a1
first release with
nightly linux32
ef20925bc2a5 / 17.0a1 / 20120725030556 / files
nightly linux64
ef20925bc2a5 / 17.0a1 / 20120725030556 / files
nightly mac
ef20925bc2a5 / 17.0a1 / 20120725030556 / files
nightly win32
ef20925bc2a5 / 17.0a1 / 20120725030556 / files
nightly win64
ef20925bc2a5 / 17.0a1 / 20120725030556 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge m-c to fx-team
browser/devtools/shared/Require.jsm
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1209,19 +1209,20 @@
             // if we're adding tabs, we're past interrupt mode, ditch the owner
             if (this.mCurrentTab.owner)
               this.mCurrentTab.owner = null;
 
             var t = document.createElementNS(
               "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
                                              "tab");
 
-            var blank = !aURI || (aURI == "about:blank");
-
-            if (blank)
+            var uriIsBlankPage = !aURI || isBlankPageURL(aURI);
+            var uriIsNotAboutBlank = aURI && aURI != "about:blank";
+
+            if (uriIsBlankPage)
               t.setAttribute("label", this.mStringBundle.getString("tabs.emptyTabTitle"));
             else
               t.setAttribute("label", aURI);
 
             t.setAttribute("crop", "end");
             t.setAttribute("validate", "never");
             t.setAttribute("onerror", "this.removeAttribute('image');");
             t.className = "tabbrowser-tab";
@@ -1323,18 +1324,25 @@
             // browser element, which fires off a bunch of notifications. Some
             // of those notifications can cause code to run that inspects our
             // state, so it is important that the tab element is fully
             // initialized by this point.
             this.mPanelContainer.appendChild(notificationbox);
 
             this.tabContainer.updateVisibility();
 
+            if (uriIsNotAboutBlank) {
+              // Stop the existing about:blank load.  Otherwise, if aURI
+              // doesn't stop in-progress loads on its own, we'll get into
+              // trouble with multiple parallel loads running at once.
+              b.stop();
+            }
+
             // wire up a progress listener for the new browser object.
-            var tabListener = this.mTabProgressListener(t, b, blank);
+            var tabListener = this.mTabProgressListener(t, b, uriIsBlankPage);
             const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
                                      .createInstance(Components.interfaces.nsIWebProgress);
             filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
 #ifdef MOZ_E10S_COMPAT
             // Bug 666801 - WebProgress support for e10s
 #else
             b.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
 #endif
@@ -1346,25 +1354,20 @@
 
             // Dispatch a new tab notification.  We do this once we're
             // entirely done, so that things are in a consistent state
             // even if the event listener opens or closes tabs.
             var evt = document.createEvent("Events");
             evt.initEvent("TabOpen", true, false);
             t.dispatchEvent(evt);
 
-            if (!blank) {
-              // Stop the existing about:blank load.  Otherwise, if aURI
-              // doesn't stop in-progress loads on its own, we'll get into
-              // trouble with multiple parallel loads running at once.
-              b.stop();
-
+            if (uriIsNotAboutBlank) {
               // pretend the user typed this so it'll be available till
               // the document successfully loads
-              if (!isBlankPageURL(aURI))
+              if (!uriIsBlankPage)
                 b.userTypedValue = aURI;
 
               let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
               if (aAllowThirdPartyFixup)
                 flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
               if (aFromExternal)
                 flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
               if (aIsUTF8)
--- a/browser/devtools/commandline/gcli.jsm
+++ b/browser/devtools/commandline/gcli.jsm
@@ -21,17 +21,17 @@
  * This file is generated from separate files stored in the GCLI project.
  * Please modify the files there and use the import script so the 2 projects
  * are kept in sync.
  * For more information, ask Joe Walker <jwalker@mozilla.com>
  */
 
 var EXPORTED_SYMBOLS = [ "gcli" ];
 
-Components.utils.import("resource:///modules/devtools/Require.jsm");
+Components.utils.import("resource://gre/modules/Require.jsm");
 Components.utils.import("resource:///modules/devtools/Console.jsm");
 Components.utils.import("resource:///modules/devtools/Browser.jsm");
 
 /*
  * Copyright 2012, Mozilla Foundation and contributors
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
--- a/browser/devtools/commandline/test/browser_gcli_integrate.js
+++ b/browser/devtools/commandline/test/browser_gcli_integrate.js
@@ -6,17 +6,17 @@
 
 function test() {
   testCreateCommands();
   testRemoveCommands();
 }
 
 let [ define, require ] = (function() {
   let tempScope = {};
-  Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
+  Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
   return [ tempScope.define, tempScope.require ];
 })();
 
 registerCleanupFunction(function tearDown() {
   define = undefined;
   require = undefined;
 });
 
--- a/browser/devtools/commandline/test/browser_gcli_pref.js
+++ b/browser/devtools/commandline/test/browser_gcli_pref.js
@@ -37,17 +37,17 @@ function test() {
   });
 }
 
 let tiltEnabledOrig = undefined;
 let tabSizeOrig = undefined;
 let remoteHostOrig = undefined;
 
 function setup() {
-  Components.utils.import("resource:///modules/devtools/Require.jsm", imports);
+  Components.utils.import("resource://gre/modules/Require.jsm", imports);
   imports.settings = imports.require("gcli/settings");
 
   tiltEnabledOrig = imports.prefBranch.getBoolPref("devtools.tilt.enabled");
   tabSizeOrig = imports.prefBranch.getIntPref("devtools.editor.tabsize");
   remoteHostOrig = imports.prefBranch.getComplexValue(
           "devtools.debugger.remote-host",
           Components.interfaces.nsISupportsString).data;
 
--- a/browser/devtools/commandline/test/browser_gcli_settings.js
+++ b/browser/devtools/commandline/test/browser_gcli_settings.js
@@ -36,17 +36,17 @@ let tiltEnabled = undefined;
 let tabSize = undefined;
 let remoteHost = undefined;
 
 let tiltEnabledOrig = undefined;
 let tabSizeOrig = undefined;
 let remoteHostOrig = undefined;
 
 function setup() {
-  Components.utils.import("resource:///modules/devtools/Require.jsm", imports);
+  Components.utils.import("resource://gre/modules/Require.jsm", imports);
   imports.settings = imports.require("gcli/settings");
 
   tiltEnabled = imports.settings.getSetting("devtools.tilt.enabled");
   tabSize = imports.settings.getSetting("devtools.editor.tabsize");
   remoteHost = imports.settings.getSetting("devtools.debugger.remote-host");
 
   tiltEnabledOrig = imports.prefBranch.getBoolPref("devtools.tilt.enabled");
   tabSizeOrig = imports.prefBranch.getIntPref("devtools.editor.tabsize");
--- a/browser/devtools/commandline/test/browser_gcli_web.js
+++ b/browser/devtools/commandline/test/browser_gcli_web.js
@@ -49,17 +49,17 @@
  *
  *
  */
 
 ///////////////////////////////////////////////////////////////////////////////
 
 let [ define, require ] = (function() {
   let tempScope = {};
-  Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
+  Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
   return [ tempScope.define, tempScope.require ];
 })();
 
 let console = (function() {
   let tempScope = {};
   Components.utils.import("resource:///modules/devtools/Console.jsm", tempScope);
   return console;
 })();
--- a/browser/devtools/shared/test/browser_require_basic.js
+++ b/browser/devtools/shared/test/browser_require_basic.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that source URLs in the Web Console can be clicked to display the
 // standard View Source window.
 
 let [ define, require ] = (function() {
   let tempScope = {};
-  Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
+  Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
   return [ tempScope.define, tempScope.require ];
 })();
 
 function test() {
   addTab("about:blank", function() {
     info("Starting Require Tests");
     setup();
 
--- a/toolkit/devtools/Makefile.in
+++ b/toolkit/devtools/Makefile.in
@@ -9,9 +9,13 @@ VPATH     = @srcdir@
 
 include $(topsrcdir)/config/config.mk
 
 PARALLEL_DIRS += \
   debugger \
   sourcemap \
   $(NULL)
 
+EXTRA_JS_MODULES = \
+  Require.jsm \
+  $(NULL)
+
 include $(topsrcdir)/config/rules.mk
rename from browser/devtools/shared/Require.jsm
rename to toolkit/devtools/Require.jsm
--- a/toolkit/devtools/sourcemap/SourceMap.jsm
+++ b/toolkit/devtools/sourcemap/SourceMap.jsm
@@ -12,17 +12,17 @@
  * https://github.com/mozilla/source-map/
  */
 
 ///////////////////////////////////////////////////////////////////////////////
 
 
 var EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ];
 
-Components.utils.import('resource:///modules/devtools/Require.jsm');
+Components.utils.import('resource://gre/modules/Require.jsm');
 /* -*- Mode: js; js-indent-level: 2; -*- */
 /*
  * Copyright 2011 Mozilla Foundation and contributors
  * Licensed under the New BSD license. See LICENSE or:
  * http://opensource.org/licenses/BSD-3-Clause
  */
 define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'source-map/util', 'source-map/binary-search', 'source-map/array-set', 'source-map/base64-vlq'], function(require, exports, module) {
 
--- a/toolkit/devtools/sourcemap/tests/unit/Utils.jsm
+++ b/toolkit/devtools/sourcemap/tests/unit/Utils.jsm
@@ -7,17 +7,17 @@
 
 /*
  * WARNING!
  *
  * Do not edit this file directly, it is built from the sources at
  * https://github.com/mozilla/source-map/
  */
 
-Components.utils.import('resource:///modules/devtools/Require.jsm');
+Components.utils.import('resource://gre/modules/Require.jsm');
 Components.utils.import('resource:///modules/devtools/SourceMap.jsm');
 
 let EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ];
 /* -*- Mode: js; js-indent-level: 2; -*- */
 /*
  * Copyright 2011 Mozilla Foundation and contributors
  * Licensed under the New BSD license. See LICENSE or:
  * http://opensource.org/licenses/BSD-3-Clause