merge m-c to fx-team
authorTim Taubert <ttaubert@mozilla.com>
Thu, 02 Aug 2012 13:15:24 +0200
changeset 101169 688734575830713cdee907bf4f2c519edcf51d3c
parent 101162 5884240242948d90aa0bfdc80803b4a4ad853e04 (current diff)
parent 101168 e4359dbd754c6fd9125d0d67dda44799febf69f3 (diff)
child 101210 074fb996dfd77c993b1de2f91070f4db78714a34
child 101311 b44ee676ced83226721c5b91309b4cbaf58dcfc3
push id23219
push userttaubert@mozilla.com
push dateThu, 02 Aug 2012 11:16:12 +0000
treeherdermozilla-central@688734575830 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge m-c to fx-team
--- a/browser/base/content/test/newtab/browser_newtab_drag_drop.js
+++ b/browser/base/content/test/newtab/browser_newtab_drag_drop.js
@@ -3,16 +3,18 @@
 
 /*
  * These tests make sure that dragging and dropping sites works as expected.
  * Sites contained in the grid need to shift around to indicate the result
  * of the drag-and-drop operation. If the grid is full and we're dragging
  * a new site into it another one gets pushed out.
  */
 function runTests() {
+  requestLongerTimeout(2);
+
   // test a simple drag-and-drop scenario
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
   yield addNewTabPageTab();
   checkGrid("0,1,2,3,4,5,6,7,8");
 
   yield simulateDrop(1, 0);
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -2820,113 +2820,91 @@ let SessionStoreInternal = {
     // set smoothScroll back to the original value
     tabstrip.smoothScroll = smoothScroll;
 
     this._sendRestoreCompletedNotifications();
   },
 
   /**
    * Sets the tabs restoring order with the following priority:
-   * Selected tab, pinned tabs, visible tabs, unhidden tabs and hidden tabs.
+   * Selected tab, pinned tabs, optimized visible tabs, other visible tabs and
+   * hidden tabs.
    * @param aTabBrowser
    *        Tab browser object
    * @param aTabs
    *        Array of tab references
    * @param aTabData
    *        Array of tab data
    * @param aSelectedTab
-   *        Index of selected tab
+   *        Index of selected tab (1 is first tab, 0 no selected tab)
    */
   _setTabsRestoringOrder : function ssi__setTabsRestoringOrder(
     aTabBrowser, aTabs, aTabData, aSelectedTab) {
-    // Temporally store the pinned tabs before moving the hidden tabs and
-    // optimizing the visible tabs. In case the selected tab is a pinned tab,
-    // the index is also stored.
-    let pinnedTabs = aTabData.filter(function (aData) aData.pinned).length;
-    let pinnedTabsArray = [];
-    let pinnedTabsDataArray = [];
-    let pinnedSelectedTab = null;
-    if (pinnedTabs && aTabs.length > 1) {
+
+    // Store the selected tab. Need to substract one to get the index in aTabs.
+    let selectedTab;
+    if (aSelectedTab > 0 && aTabs[aSelectedTab - 1]) {
+      selectedTab = aTabs[aSelectedTab - 1];
+    }
+
+    // Store the pinned tabs and hidden tabs.
+    let pinnedTabs = [];
+    let pinnedTabsData = [];
+    let hiddenTabs = [];
+    let hiddenTabsData = [];
+    if (aTabs.length > 1) {
       for (let t = aTabs.length - 1; t >= 0; t--) {
         if (aTabData[t].pinned) {
-          pinnedTabsArray.unshift(aTabs.splice(t, 1)[0]);
-          pinnedTabsDataArray.unshift(aTabData.splice(t, 1)[0]);
-          if (aSelectedTab) {
-            if (aSelectedTab > (t + 1))
-              --aSelectedTab;
-            else if (aSelectedTab == (t + 1)) {
-              aSelectedTab = null;
-              pinnedSelectedTab = 1;
-            }
-          } else if (pinnedSelectedTab) 
-            ++pinnedSelectedTab;
+          pinnedTabs.unshift(aTabs.splice(t, 1)[0]);
+          pinnedTabsData.unshift(aTabData.splice(t, 1)[0]);
+        } else if (aTabData[t].hidden) {
+          hiddenTabs.unshift(aTabs.splice(t, 1)[0]);
+          hiddenTabsData.unshift(aTabData.splice(t, 1)[0]);
         }
       }
     }
 
-    // Without the pinned tabs, we move the hidden tabs to the end of the list
-    // and optimize the visible tabs. 
-    let unhiddenTabs = aTabData.filter(function (aData) !aData.hidden).length;
-    if (unhiddenTabs && aTabs.length > 1) {
-      // Load hidden tabs last, by pushing them to the end of the list.
-      for (let t = 0, tabsToReorder = aTabs.length - unhiddenTabs; tabsToReorder > 0; ) {
-        if (aTabData[t].hidden) {
-          aTabs = aTabs.concat(aTabs.splice(t, 1));
-          aTabData = aTabData.concat(aTabData.splice(t, 1));
-          if (aSelectedTab && aSelectedTab > t)
-            --aSelectedTab;
-          --tabsToReorder;
-          continue;
+    // Optimize the visible tabs only if there is a selected tab.
+    if (selectedTab) {
+      let selectedTabIndex = aTabs.indexOf(selectedTab);
+      if (selectedTabIndex > 0) {
+        let scrollSize = aTabBrowser.tabContainer.mTabstrip.scrollClientSize;
+        let tabWidth = aTabs[0].getBoundingClientRect().width;
+        let maxVisibleTabs = Math.ceil(scrollSize / tabWidth);
+        if (maxVisibleTabs < aTabs.length) {
+          let firstVisibleTab = 0;
+          let nonVisibleTabsCount = aTabs.length - maxVisibleTabs;
+          if (nonVisibleTabsCount >= selectedTabIndex) {
+            // Selected tab is leftmost since we scroll to it when possible.
+            firstVisibleTab = selectedTabIndex;
+          } else {
+            // Selected tab is rightmost or no more room to scroll right.
+            firstVisibleTab = nonVisibleTabsCount;
+          }
+          aTabs = aTabs.splice(firstVisibleTab, maxVisibleTabs).concat(aTabs);
+          aTabData =
+            aTabData.splice(firstVisibleTab, maxVisibleTabs).concat(aTabData);
         }
-        ++t;
-      }
-
-      // Determine if we can optimize & load visible tabs first
-      let maxVisibleTabs = Math.ceil(aTabBrowser.tabContainer.mTabstrip.scrollClientSize /
-                                     aTabs[unhiddenTabs - 1].getBoundingClientRect().width);
-
-      // Make sure we restore visible tabs first, if there are enough
-      if (aSelectedTab && maxVisibleTabs < unhiddenTabs && aSelectedTab > 1) {
-        let firstVisibleTab = 0;
-        if (unhiddenTabs - maxVisibleTabs > aSelectedTab) {
-          // aSelectedTab is leftmost since we scroll to it when possible
-          firstVisibleTab = aSelectedTab - 1;
-        } else {
-          // aSelectedTab is rightmost or no more room to scroll right
-          firstVisibleTab = unhiddenTabs - maxVisibleTabs;
-        }
-        aTabs = aTabs.splice(firstVisibleTab, maxVisibleTabs).concat(aTabs);
-        aTabData = aTabData.splice(firstVisibleTab, maxVisibleTabs).concat(aTabData);
-        aSelectedTab -= firstVisibleTab;
       }
     }
 
-    // Load the pinned tabs at the beginning of the list and restore the
-    // selected tab index.
-    if (pinnedTabsArray) {
-      // Restore the selected tab index.
-      if (pinnedSelectedTab) {
-        aSelectedTab = pinnedSelectedTab;
-      } else {
-        aSelectedTab += pinnedTabsArray.length;
+    // Merge the stored tabs in order.
+    aTabs = pinnedTabs.concat(aTabs, hiddenTabs);
+    aTabData = pinnedTabsData.concat(aTabData, hiddenTabsData);
+
+    // Load the selected tab to the first position and select it.
+    if (selectedTab) {
+      let selectedTabIndex = aTabs.indexOf(selectedTab);
+      if (selectedTabIndex > 0) {
+        aTabs = aTabs.splice(selectedTabIndex, 1).concat(aTabs);
+        aTabData = aTabData.splice(selectedTabIndex, 1).concat(aTabData);
       }
-      // Load the pinned tabs at the beginning of the list.
-      for (let t = pinnedTabsArray.length - 1; t >= 0; t--) {
-        aTabs.unshift(pinnedTabsArray.splice(t, 1)[0]);
-        aTabData.unshift(pinnedTabsDataArray.splice(t, 1)[0]);
-      }
+      aTabBrowser.selectedTab = selectedTab;
     }
 
-    // Load the selected tab to the first position.
-    if (aSelectedTab-- && aTabs[aSelectedTab]) {
-      aTabs.unshift(aTabs.splice(aSelectedTab, 1)[0]);
-      aTabData.unshift(aTabData.splice(aSelectedTab, 1)[0]);
-      aTabBrowser.selectedTab = aTabs[0];
-    }
-    
     return [aTabs, aTabData];
   },
   
   /**
    * Manage history restoration for a window
    * @param aWindow
    *        Window to restore the tabs into
    * @param aTabs
--- a/browser/components/tabview/test/browser_tabview_bug595601.js
+++ b/browser/components/tabview/test/browser_tabview_bug595601.js
@@ -15,17 +15,17 @@ let state = {windows:[{tabs:[
   {entries:[{url:"http://example.com#3"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#3\",\"groupID\":2}"}},
   {entries:[{url:"http://example.com#4"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#4\",\"groupID\":2}"}},
 
   // second group
   {entries:[{url:"http://example.com#5"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#5\",\"groupID\":1}"}},
   {entries:[{url:"http://example.com#6"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#6\",\"groupID\":1}"}},
   {entries:[{url:"http://example.com#7"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#7\",\"groupID\":1}"}},
   {entries:[{url:"http://example.com#8"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#8\",\"groupID\":1}"}}
-],selected:5,extData:{
+],selected:4,extData:{
   "tabview-groups":"{\"nextID\":8,\"activeGroupId\":1}","tabview-group":"{\"1\":{\"bounds\":{\"left\":15,\"top\":10,\"width\":415,\"height\":367},\"userSize\":{\"x\":415,\"y\":367},\"title\":\"\",\"id\":1},\"2\":{\"bounds\":{\"left\":286,\"top\":488,\"width\":418,\"height\":313},\"title\":\"\",\"id\":2}}",
   "tabview-ui":"{\"pageBounds\":{\"left\":0,\"top\":0,\"width\":940,\"height\":1075}}"
 }}]};
 
 function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref("browser.sessionstore.restore_hidden_tabs", false);
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -6,16 +6,17 @@
 "use strict";
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const FRAME_STEP_CACHE_DURATION = 100; // ms
 const DBG_STRINGS_URI = "chrome://browser/locale/devtools/debugger.properties";
+const SCRIPTS_URL_MAX_LENGTH = 64; // chars
 const SYNTAX_HIGHLIGHT_MAX_FILE_SIZE = 1048576; // 1 MB in bytes
 
 Cu.import("resource:///modules/source-editor.jsm");
 Cu.import("resource://gre/modules/devtools/dbg-server.jsm");
 Cu.import("resource://gre/modules/devtools/dbg-client.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import('resource://gre/modules/Services.jsm');
@@ -430,16 +431,17 @@ StackFrames.prototype = {
    *        The response packet.
    */
   _onPaused: function SF__onPaused(aEvent, aPacket) {
     // In case the pause was caused by an exception, store the exception value.
     if (aPacket.why.type == "exception") {
       this.exception = aPacket.why.exception;
     }
     this.activeThread.fillFrames(this.pageSize);
+    DebuggerView.editor.focus();
   },
 
   /**
    * Handler for the thread client's resumed notification.
    */
   _onResume: function SF__onResume() {
     DebuggerView.editor.setDebugLocation(-1);
   },
@@ -1083,17 +1085,22 @@ SourceScripts.prototype = {
    *        The script url.
    * @param string aHref
    *        The content location href to be used. If unspecified, it will
    *        default to the script url prepath.
    * @return string
    *         The simplified label.
    */
   getScriptLabel: function SS_getScriptLabel(aUrl, aHref) {
-    return this._labelsCache[aUrl] || (this._labelsCache[aUrl] = this._trimUrl(aUrl));
+    let label = this._trimUrl(aUrl);
+    if (label.length > SCRIPTS_URL_MAX_LENGTH) {
+      let ellipsis = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString);
+      label = label.substring(0, SCRIPTS_URL_MAX_LENGTH) + ellipsis.data;
+    }
+    return this._labelsCache[aUrl] || (this._labelsCache[aUrl] = label);
   },
 
   /**
    * Clears the labels cache, populated by SS_getScriptLabel.
    * This should be done every time the content location changes.
    */
   _clearLabelsCache: function SS__clearLabelsCache() {
     this._labelsCache = {};
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -76,16 +76,17 @@ let DebuggerView = {
   },
 
   /**
    * The load event handler for the source editor. This method does post-load
    * editor initialization.
    */
   _onEditorLoad: function DV__onEditorLoad() {
     DebuggerController.Breakpoints.initialize();
+    this.editor.focus();
   },
 
   /**
    * Sets the close button hidden or visible. It's hidden by default.
    * @param boolean aVisibleFlag
    */
   showCloseButton: function DV_showCloseButton(aVisibleFlag) {
     document.getElementById("close").setAttribute("hidden", !aVisibleFlag);
@@ -521,16 +522,32 @@ ScriptsView.prototype = {
       let offset = editor.findNext(true);
       if (offset > -1) {
         editor.setSelection(offset, offset + token.length)
       }
     }
   },
 
   /**
+   * Called when the scripts filter key sequence was pressed.
+   */
+  _onSearch: function DVS__onSearch() {
+    this._searchbox.focus();
+    this._searchbox.value = "";
+  },
+
+  /**
+   * Called when the scripts token filter key sequence was pressed.
+   */
+  _onTokenSearch: function DVS__onTokenSearch() {
+    this._searchbox.focus();
+    this._searchbox.value = "#";
+  },
+
+  /**
    * The cached scripts container and search box.
    */
   _scripts: null,
   _searchbox: null,
 
   /**
    * Initialization function, called when the debugger is initialized.
    */
@@ -561,20 +578,20 @@ ScriptsView.prototype = {
 
 /**
  * Functions handling the html stackframes UI.
  */
 function StackFramesView() {
   this._onFramesScroll = this._onFramesScroll.bind(this);
   this._onPauseExceptionsClick = this._onPauseExceptionsClick.bind(this);
   this._onCloseButtonClick = this._onCloseButtonClick.bind(this);
-  this._onResumeButtonClick = this._onResumeButtonClick.bind(this);
-  this._onStepOverClick = this._onStepOverClick.bind(this);
-  this._onStepInClick = this._onStepInClick.bind(this);
-  this._onStepOutClick = this._onStepOutClick.bind(this);
+  this._onResume = this._onResume.bind(this);
+  this._onStepOver = this._onStepOver.bind(this);
+  this._onStepIn = this._onStepIn.bind(this);
+  this._onStepOut = this._onStepOut.bind(this);
 }
 
 StackFramesView.prototype = {
 
   /**
    * Sets the current frames state based on the debugger active thread state.
    *
    * @param string aState
@@ -772,43 +789,49 @@ StackFramesView.prototype = {
   _onPauseExceptionsClick: function DVF__onPauseExceptionsClick() {
     let option = document.getElementById("pause-exceptions");
     DebuggerController.StackFrames.updatePauseOnExceptions(option.checked);
   },
 
   /**
    * Listener handling the pause/resume button click event.
    */
-  _onResumeButtonClick: function DVF__onResumeButtonClick() {
+  _onResume: function DVF__onResume(e) {
     if (DebuggerController.activeThread.paused) {
       DebuggerController.activeThread.resume();
     } else {
       DebuggerController.activeThread.interrupt();
     }
   },
 
   /**
    * Listener handling the step over button click event.
    */
-  _onStepOverClick: function DVF__onStepOverClick() {
-    DebuggerController.activeThread.stepOver();
+  _onStepOver: function DVF__onStepOver(e) {
+    if (DebuggerController.activeThread.paused) {
+      DebuggerController.activeThread.stepOver();
+    }
   },
 
   /**
    * Listener handling the step in button click event.
    */
-  _onStepInClick: function DVF__onStepInClick() {
-    DebuggerController.activeThread.stepIn();
+  _onStepIn: function DVF__onStepIn(e) {
+    if (DebuggerController.activeThread.paused) {
+      DebuggerController.activeThread.stepIn();
+    }
   },
 
   /**
    * Listener handling the step out button click event.
    */
-  _onStepOutClick: function DVF__onStepOutClick() {
-    DebuggerController.activeThread.stepOut();
+  _onStepOut: function DVF__onStepOut(e) {
+    if (DebuggerController.activeThread.paused) {
+      DebuggerController.activeThread.stepOut();
+    }
   },
 
   /**
    * Specifies if the active thread has more frames which need to be loaded.
    */
   _dirty: false,
 
   /**
@@ -825,23 +848,21 @@ StackFramesView.prototype = {
     let resume = document.getElementById("resume");
     let stepOver = document.getElementById("step-over");
     let stepIn = document.getElementById("step-in");
     let stepOut = document.getElementById("step-out");
     let frames = document.getElementById("stackframes");
 
     close.addEventListener("click", this._onCloseButtonClick, false);
     pauseOnExceptions.checked = DebuggerController.StackFrames.pauseOnExceptions;
-    pauseOnExceptions.addEventListener("click",
-                                        this._onPauseExceptionsClick,
-                                        false);
-    resume.addEventListener("click", this._onResumeButtonClick, false);
-    stepOver.addEventListener("click", this._onStepOverClick, false);
-    stepIn.addEventListener("click", this._onStepInClick, false);
-    stepOut.addEventListener("click", this._onStepOutClick, false);
+    pauseOnExceptions.addEventListener("click", this._onPauseExceptionsClick, false);
+    resume.addEventListener("click", this._onResume, false);
+    stepOver.addEventListener("click", this._onStepOver, false);
+    stepIn.addEventListener("click", this._onStepIn, false);
+    stepOut.addEventListener("click", this._onStepOut, false);
     frames.addEventListener("click", this._onFramesClick, false);
     frames.addEventListener("scroll", this._onFramesScroll, false);
     window.addEventListener("resize", this._onFramesScroll, false);
 
     this._frames = frames;
     this.emptyText();
   },
 
@@ -853,23 +874,21 @@ StackFramesView.prototype = {
     let pauseOnExceptions = document.getElementById("pause-exceptions");
     let resume = document.getElementById("resume");
     let stepOver = document.getElementById("step-over");
     let stepIn = document.getElementById("step-in");
     let stepOut = document.getElementById("step-out");
     let frames = this._frames;
 
     close.removeEventListener("click", this._onCloseButtonClick, false);
-    pauseOnExceptions.removeEventListener("click",
-                                          this._onPauseExceptionsClick,
-                                          false);
-    resume.removeEventListener("click", this._onResumeButtonClick, false);
-    stepOver.removeEventListener("click", this._onStepOverClick, false);
-    stepIn.removeEventListener("click", this._onStepInClick, false);
-    stepOut.removeEventListener("click", this._onStepOutClick, false);
+    pauseOnExceptions.removeEventListener("click", this._onPauseExceptionsClick, false);
+    resume.removeEventListener("click", this._onResume, false);
+    stepOver.removeEventListener("click", this._onStepOver, false);
+    stepIn.removeEventListener("click", this._onStepIn, false);
+    stepOut.removeEventListener("click", this._onStepOut, false);
     frames.removeEventListener("click", this._onFramesClick, false);
     frames.removeEventListener("scroll", this._onFramesScroll, false);
     window.removeEventListener("resize", this._onFramesScroll, false);
 
     this.empty();
     this._frames = null;
   }
 };
--- a/browser/devtools/debugger/debugger.xul
+++ b/browser/devtools/debugger/debugger.xul
@@ -32,16 +32,32 @@
       <menuseparator/>
       <menuitem id="se-cMenu-gotoLine"/>
     </menupopup>
   </popupset>
 
   <commandset id="editMenuCommands"/>
   <commandset id="sourceEditorCommands"/>
   <keyset id="sourceEditorKeys"/>
+  <keyset id="scriptSearchKeys">
+    <key key="P" modifiers="access shift"
+         oncommand="DebuggerView.Scripts._onSearch()"/>
+    <key key="T" modifiers="access shift"
+         oncommand="DebuggerView.Scripts._onTokenSearch()"/>
+  </keyset>
+  <keyset id="threadStateKeys">
+    <key keycode="VK_F6"
+         oncommand="DebuggerView.StackFrames._onResume()"/>
+    <key keycode="VK_F7"
+         oncommand="DebuggerView.StackFrames._onStepOver()"/>
+    <key keycode="VK_F8"
+         oncommand="DebuggerView.StackFrames._onStepIn()"/>
+    <key keycode="VK_F8" modifiers="shift"
+         oncommand="DebuggerView.StackFrames._onStepOut()"/>
+  </keyset>
 
   <vbox id="body" flex="1">
     <toolbar id="dbg-toolbar" class="devtools-toolbar">
 #ifdef XP_MACOSX
       <toolbarbutton id="close"
                      tooltiptext="&debuggerUI.closeButton.tooltip;"
                      class="devtools-closebutton"/>
 #endif
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-01.js
@@ -35,16 +35,19 @@ function testScriptLabelShortening() {
     let vs = gDebugger.DebuggerView.Scripts;
     let ss = gDebugger.DebuggerController.SourceScripts;
     vs.empty();
     vs._scripts.removeEventListener("select", vs._onScriptsChange, false);
 
     is(ss.trimUrlQuery("a/b/c.d?test=1&random=4#reference"), "a/b/c.d",
       "Trimming the url query isn't done properly.");
 
+    let ellipsis = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString);
+    let nanana = new Array(20).join(NaN);
+
     let urls = [
       { href: "http://some.address.com/random/", leaf: "subrandom/" },
       { href: "http://some.address.com/random/", leaf: "suprandom/?a=1" },
       { href: "http://some.address.com/random/", leaf: "?a=1" },
       { href: "https://another.address.org/random/subrandom/", leaf: "page.html" },
 
       { href: "ftp://interesting.address.org/random/", leaf: "script.js" },
       { href: "ftp://interesting.address.com/random/", leaf: "script.js" },
@@ -57,17 +60,19 @@ function testScriptLabelShortening() {
       { href: "ftp://interesting.address.com/random/x/y/", leaf: "script.js?a=2&b=3&c=4", dupe: true },
 
       { href: "file://random/", leaf: "script_t1.js&a=1&b=2&c=3" },
       { href: "file://random/", leaf: "script_t2_1.js#id" },
       { href: "file://random/", leaf: "script_t2_2.js?a" },
       { href: "file://random/", leaf: "script_t2_3.js&b" },
       { href: "resource://random/", leaf: "script_t3_1.js#id?a=1&b=2" },
       { href: "resource://random/", leaf: "script_t3_2.js?a=1&b=2#id" },
-      { href: "resource://random/", leaf: "script_t3_3.js&a=1&b=2#id" }
+      { href: "resource://random/", leaf: "script_t3_3.js&a=1&b=2#id" },
+
+      { href: nanana, leaf: "Batman!" + "{trim me, now and forevermore}" }
     ];
 
     urls.forEach(function(url) {
       executeSoon(function() {
         let loc = url.href + url.leaf;
         vs.addScript(ss.getScriptLabel(loc, url.href), { url: loc }, true);
       });
     });
@@ -116,16 +121,19 @@ function testScriptLabelShortening() {
         "Script (11) label is incorrect.");
       ok(gDebugger.DebuggerView.Scripts.containsLabel("script_t3_1.js"),
         "Script (12) label is incorrect.");
       ok(gDebugger.DebuggerView.Scripts.containsLabel("script_t3_2.js"),
         "Script (13) label is incorrect.");
       ok(gDebugger.DebuggerView.Scripts.containsLabel("script_t3_3.js"),
         "Script (14) label is incorrect.");
 
+      ok(gDebugger.DebuggerView.Scripts.containsLabel(nanana + "Batman!" + ellipsis),
+        "Script (15) label is incorrect.");
+
       is(vs._scripts.itemCount, urls.filter(function(url) !url.dupe).length,
         "Didn't get the correct number of scripts in the list.");
 
       closeDebuggerAndFinish();
     });
   });
 }
 
--- a/browser/themes/gnomestripe/devtools/debugger.css
+++ b/browser/themes/gnomestripe/devtools/debugger.css
@@ -12,17 +12,16 @@
  * Debugger content
  */
 
 #dbg-content {
   padding: 0;
 }
 
 #scripts {
-  max-width: 350px;
   min-width: 150px;
 }
 
 /**
  * Lists and headers
  */
 
 .list-item {
--- a/browser/themes/pinstripe/devtools/debugger.css
+++ b/browser/themes/pinstripe/devtools/debugger.css
@@ -14,17 +14,16 @@
  * Debugger content
  */
 
 #dbg-content {
   padding: 0;
 }
 
 #scripts {
-  max-width: 350px;
   min-width: 150px;
 }
 
 /**
  * Lists and headers
  */
 
 .list-item {
--- a/browser/themes/winstripe/devtools/debugger.css
+++ b/browser/themes/winstripe/devtools/debugger.css
@@ -12,17 +12,16 @@
  * Debugger content
  */
 
 #dbg-content {
   padding: 0;
 }
 
 #scripts {
-  max-width: 350px;
   min-width: 150px;
 }
 
 /**
  * This hardcoded width likely due to a toolkit Windows specific bug.
  * See http://hg.mozilla.org/mozilla-central/annotate/f38d6df93cad/toolkit/themes/winstripe/global/textbox-aero.css#l7
  */
 #scripts-search {
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1549,19 +1549,16 @@ public:
   nsresult
   CollectForRuntime(bool aIsQuick, void* aData)
   {
     AssertIsOnMainThread();
 
     if (!mWorkerPrivate) {
 #ifdef DEBUG
       nsCAutoString message("Unable to report memory for ");
-      if (mWorkerPrivate->IsChromeWorker()) {
-        message.AppendLiteral("Chrome");
-      }
       message += NS_LITERAL_CSTRING("Worker (") + mAddressString +
                  NS_LITERAL_CSTRING(")! It is either using ctypes or is in "
                                     "the process of being destroyed");
       NS_WARNING(message.get());
 #endif
       return NS_OK;
     }