Merge the last green PGO changeset on mozilla-inbound into mozilla-central; a=me
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 18 Apr 2012 16:18:04 -0400
changeset 95223 da53be6847941ee5a7017e8eaa79eea029547a0f
parent 95222 8f6fdee0a7128026af59db5b363b0befeaa8eb2c (current diff)
parent 95204 f9fbee492a5cd7277c0d32e011469d4536f241c8 (diff)
child 95228 a9b543de6b67b00bb67d41981451bd5e9f04b4b6
child 95239 31d07d8738379598f5c717655120e14cfcc4ccd2
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone14.0a1
first release with
nightly linux32
da53be684794 / 14.0a1 / 20120419030644 / files
nightly linux64
da53be684794 / 14.0a1 / 20120419030644 / files
nightly mac
da53be684794 / 14.0a1 / 20120419030644 / files
nightly win32
da53be684794 / 14.0a1 / 20120419030644 / files
nightly win64
da53be684794 / 14.0a1 / 20120419030644 / 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 the last green PGO changeset on mozilla-inbound into mozilla-central; a=me
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3071,24 +3071,23 @@ function getMarkupDocumentViewer()
  *       which performs the same function, but for embedded clients that
  *       don't use a XUL/JS layer. It is important that the logic of
  *       these two routines be kept more or less in sync.
  *       (pinkerton)
  **/
 function FillInHTMLTooltip(tipElement)
 {
   var retVal = false;
-  // Don't show the tooltip if the tooltip node is a XUL element, a document or is disconnected.
-  if (tipElement.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" ||
-      !tipElement.ownerDocument ||
+  // Don't show the tooltip if the tooltip node is a document or disconnected.
+  if (!tipElement.ownerDocument ||
       (tipElement.ownerDocument.compareDocumentPosition(tipElement) & document.DOCUMENT_POSITION_DISCONNECTED))
     return retVal;
 
   const XLinkNS = "http://www.w3.org/1999/xlink";
-
+  const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
   var titleText = null;
   var XLinkTitleText = null;
   var SVGTitleText = null;
   var lookingForSVGTitle = true;
   var direction = tipElement.ownerDocument.dir;
 
   // If the element is invalid per HTML5 Forms specifications and has no title,
@@ -3100,17 +3099,18 @@ function FillInHTMLTooltip(tipElement)
       !tipElement.hasAttribute('title') &&
       (!tipElement.form || !tipElement.form.noValidate)) {
     // If the element is barred from constraint validation or valid,
     // the validation message will be the empty string.
     titleText = tipElement.validationMessage;
   }
 
   while (!titleText && !XLinkTitleText && !SVGTitleText && tipElement) {
-    if (tipElement.nodeType == Node.ELEMENT_NODE) {
+    if (tipElement.nodeType == Node.ELEMENT_NODE &&
+        tipElement.namespaceURI != XULNS) {
       titleText = tipElement.getAttribute("title");
       if ((tipElement instanceof HTMLAnchorElement ||
            tipElement instanceof HTMLAreaElement ||
            tipElement instanceof HTMLLinkElement ||
            tipElement instanceof SVGAElement) && tipElement.href) {
         XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
       }
       if (lookingForSVGTitle &&
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -719,17 +719,18 @@ SourceScripts.prototype = {
       if (/javascript/.test(aContentType)) {
         DebuggerView.editor.setMode(SourceEditor.MODES.JAVASCRIPT);
       } else {
         DebuggerView.editor.setMode(SourceEditor.MODES.HTML);
       }
       return;
     }
 
-    if (this._trimUrlQuery(aUrl).slice(-3) == ".js") {
+    // Use JS mode for files with .js and .jsm extensions.
+    if (/\.jsm?$/.test(this._trimUrlQuery(aUrl))) {
       DebuggerView.editor.setMode(SourceEditor.MODES.JAVASCRIPT);
     } else {
       DebuggerView.editor.setMode(SourceEditor.MODES.HTML);
     }
   },
 
   /**
    * Trims the query part of a url string, if necessary.
--- a/browser/devtools/highlighter/highlighter.jsm
+++ b/browser/devtools/highlighter/highlighter.jsm
@@ -252,16 +252,17 @@ Highlighter.prototype = {
    * Notify that a pseudo-class lock was toggled on the highlighted element
    *
    * @param aPseudo - The pseudo-class to toggle, e.g. ":hover".
    */
   pseudoClassLockToggled: function Highlighter_pseudoClassLockToggled(aPseudo)
   {
     this.emitEvent("pseudoclasstoggled", [aPseudo]);
     this.updateInfobar();
+    this.moveInfobar();
   },
 
   /**
    * Update the highlighter size and position.
    */
   invalidateSize: function Highlighter_invalidateSize(aScroll)
   {
     let rect = null;
@@ -496,16 +497,30 @@ Highlighter.prototype = {
     nodemenu.className = "highlighter-nodeinfobar-button"
     nodemenu.setAttribute("tooltiptext",
                           this.strings.GetStringFromName("nodeMenu.tooltiptext"));
 
     let menu = this.chromeDoc.getElementById("inspector-node-popup");
     menu = menu.cloneNode(true);
     menu.id = "highlighter-node-menu";
 
+    let separator = this.chromeDoc.createElement("menuseparator");
+    menu.appendChild(separator);
+
+    menu.addEventListener("popupshowing", function() {
+      let items = menu.getElementsByClassName("highlighter-pseudo-class-menuitem");
+      let i = items.length;
+      while (i--) {
+        menu.removeChild(items[i]);
+      }
+
+      let fragment = this.buildPseudoClassMenu();
+      menu.appendChild(fragment);
+    }.bind(this), true);
+
     nodemenu.appendChild(menu);
 
     // <hbox id="highlighter-nodeinfobar-text"/>
     let texthbox = this.chromeDoc.createElement("hbox");
     texthbox.id = "highlighter-nodeinfobar-text";
     texthbox.setAttribute("align", "center");
     texthbox.setAttribute("flex", "1");
 
@@ -519,68 +534,47 @@ Highlighter.prototype = {
     nodeInfobar.appendChild(nodemenu);
 
     container.appendChild(arrowBoxTop);
     container.appendChild(nodeInfobar);
     container.appendChild(arrowBoxBottom);
 
     aParent.appendChild(container);
 
-    nodeInfobar.onclick = (function _onInfobarRightClick(aEvent) {
-      if (aEvent.button == 2) {
-        this.openPseudoClassMenu();
-      }
-    }).bind(this);
-
     let barHeight = container.getBoundingClientRect().height;
 
     this.nodeInfo = {
       tagNameLabel: tagNameLabel,
       idLabel: idLabel,
       classesBox: classesBox,
       pseudoClassesBox: pseudoClassesBox,
       container: container,
       barHeight: barHeight,
     };
   },
 
   /**
-   * Open the infobar's pseudo-class context menu.
-   */
-  openPseudoClassMenu: function Highlighter_openPseudoClassMenu()
-  {
-    let menu = this.chromeDoc.createElement("menupopup");
-    menu.id = "infobar-context-menu";
-
-    let popupSet = this.chromeDoc.getElementById("mainPopupSet");
-    popupSet.appendChild(menu);
-
-    let fragment = this.buildPseudoClassMenu();
-    menu.appendChild(fragment);
-
-    menu.openPopup(this.nodeInfo.pseudoClassesBox, "end_before", 0, 0, true, false);
-  },
-
-  /**
    * Create the menuitems for toggling the selection's pseudo-class state
    *
    * @returns DocumentFragment. The menuitems for toggling pseudo-classes.
    */
   buildPseudoClassMenu: function IUI_buildPseudoClassesMenu()
   {
     let fragment = this.chromeDoc.createDocumentFragment();
     for (let i = 0; i < PSEUDO_CLASSES.length; i++) {
       let pseudo = PSEUDO_CLASSES[i];
       let item = this.chromeDoc.createElement("menuitem");
+      item.id = "highlighter-pseudo-class-menuitem-" + pseudo;
       item.setAttribute("type", "checkbox");
       item.setAttribute("label", pseudo);
+      item.className = "highlighter-pseudo-class-menuitem";
+      item.setAttribute("checked", DOMUtils.hasPseudoClassLock(this.node,
+                        pseudo));
       item.addEventListener("command",
                             this.pseudoClassLockToggled.bind(this, pseudo), false);
-      item.setAttribute("checked", DOMUtils.hasPseudoClassLock(this.node,
-                         pseudo));
       fragment.appendChild(item);
     }
     return fragment;
   },
 
   /**
    * Highlight a rectangular region.
    *
--- a/browser/devtools/highlighter/test/Makefile.in
+++ b/browser/devtools/highlighter/test/Makefile.in
@@ -69,16 +69,17 @@ include $(topsrcdir)/config/rules.mk
 		browser_inspector_bug_699308_iframe_navigation.js \
 		browser_inspector_changes.js \
 		browser_inspector_ruleviewstore.js \
 		browser_inspector_duplicate_ruleview.js \
 		browser_inspector_invalidate.js \
 		browser_inspector_sidebarstate.js \
 		browser_inspector_treePanel_menu.js \
 		browser_inspector_pseudoclass_lock.js \
+		browser_inspector_pseudoClass_menu.js \
 		head.js \
 		$(NULL)
 
 # Disabled due to constant failures
 # 		browser_inspector_treePanel_click.js \
 
 libs::	$(_BROWSER_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/browser/devtools/highlighter/test/browser_inspector_pseudoClass_menu.js
@@ -0,0 +1,87 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
+
+let pseudos = [":hover", ":active", ":focus"];
+
+let doc;
+let div;
+let menu;
+
+function test()
+{
+  waitForExplicitFinish();
+  ignoreAllUncaughtExceptions();
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function() {
+    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
+    doc = content.document;
+    waitForFocus(createDocument, content);
+  }, true);
+
+  content.location = "data:text/html,pseudo-class lock node menu tests";
+}
+
+function createDocument()
+{
+  div = doc.createElement("div");
+  div.textContent = "test div";
+
+  doc.body.appendChild(div);
+
+  setupTests();
+}
+
+function setupTests()
+{
+  Services.obs.addObserver(selectNode,
+    InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED, false);
+  InspectorUI.openInspectorUI();
+}
+
+function selectNode()
+{
+  Services.obs.removeObserver(selectNode,
+    InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED);
+
+  executeSoon(function() {
+    InspectorUI.highlighter.addListener("nodeselected", performTests);
+    InspectorUI.inspectNode(div);
+  });
+}
+
+function performTests()
+{
+  InspectorUI.highlighter.removeListener("nodeselected", performTests);
+
+  menu = document.getElementById("highlighter-node-menu");
+  menu.addEventListener("popupshowing", testMenuItems, true);
+
+  menu.openPopup();
+}
+
+function testMenuItems()
+{
+  menu.removeEventListener("popupshowing", testMenuItems, true);
+
+  for each (let pseudo in pseudos) {
+    let menuitem = document.getElementById("highlighter-pseudo-class-menuitem-"
+                   + pseudo);
+    ok(menuitem, pseudo + " menuitem exists");
+
+    menuitem.doCommand();
+
+    is(DOMUtils.hasPseudoClassLock(div, pseudo), true,
+       "pseudo-class lock has been applied");
+  }
+  finishUp();
+}
+
+function finishUp()
+{
+  InspectorUI.closeInspectorUI();
+  doc = div = null;
+  gBrowser.removeCurrentTab();
+  finish();
+}
--- a/browser/devtools/styleinspector/CssHtmlTree.jsm
+++ b/browser/devtools/styleinspector/CssHtmlTree.jsm
@@ -547,16 +547,20 @@ CssHtmlTree.prototype = {
   computedViewMenuUpdate: function si_computedViewMenuUpdate()
   {
     let win = this.styleDocument.defaultView;
     let disable = win.getSelection().isCollapsed;
     let menuitem = this.doc.querySelector("#computed-view-copy");
     menuitem.disabled = disable;
 
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("property-view")) {
       while (node = node.parentElement) {
         if (node.classList.contains("property-view")) {
           break;
         }
       }
     }
     let disablePropertyItems = !node;
@@ -594,16 +598,20 @@ CssHtmlTree.prototype = {
   /**
    * Copy declaration.
    *
    * @param aEvent The event object
    */
   computedViewCopyDeclaration: function si_computedViewCopyDeclaration(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("property-view")) {
       while (node = node.parentElement) {
         if (node.classList.contains("property-view")) {
           break;
         }
       }
     }
     if (node) {
@@ -617,16 +625,20 @@ CssHtmlTree.prototype = {
   /**
    * Copy property name.
    *
    * @param aEvent The event object
    */
   computedViewCopyProperty: function si_computedViewCopyProperty(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("property-view")) {
       while (node = node.parentElement) {
         if (node.classList.contains("property-view")) {
           break;
         }
       }
     }
     if (node) {
@@ -638,16 +650,20 @@ CssHtmlTree.prototype = {
   /**
    * Copy property value.
    *
    * @param aEvent The event object
    */
   computedViewCopyPropertyValue: function si_computedViewCopyPropertyValue(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("property-view")) {
       while (node = node.parentElement) {
         if (node.classList.contains("property-view")) {
           break;
         }
       }
     }
     if (node) {
--- a/browser/devtools/styleinspector/CssRuleView.jsm
+++ b/browser/devtools/styleinspector/CssRuleView.jsm
@@ -924,16 +924,20 @@ CssRuleView.prototype = {
   _onMenuUpdate: function CssRuleView_onMenuUpdate(aEvent)
   {
     // Copy selection.
     let disable = this.doc.defaultView.getSelection().isCollapsed;
     this._copyItem.disabled = disable;
 
     // Copy property, copy property name & copy property value.
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("ruleview-property") &&
         !node.classList.contains("ruleview-computed")) {
       while (node = node.parentElement) {
         if (node.classList.contains("ruleview-property") ||
           node.classList.contains("ruleview-computed")) {
           break;
         }
       }
@@ -1002,95 +1006,112 @@ CssRuleView.prototype = {
 
   /**
    * Copy a rule from the rule view.
    *
    * @param aEvent The event object
    */
   _onCopyRule: function CssRuleView_onCopyRule(aEvent)
   {
+    let terminator;
     let node = this.doc.popupNode;
-    if (node.className != "ruleview-code") {
-      if (node.className == "ruleview-rule-source") {
-        node = node.nextElementSibling;
-      } else {
-        while (node = node.parentElement) {
-          if (node.className == "ruleview-code") {
-            break;
-          }
+    if (!node) {
+      return;
+    }
+
+    if (node.className != "rule-view-row") {
+      while (node = node.parentElement) {
+        if (node.className == "rule-view-row") {
+          break;
         }
       }
     }
+    node = node.cloneNode();
 
-    if (node.className == "ruleview-code") {
-      // We need to strip expanded properties from the node because we use
-      // node.textContent below, which also gets text from hidden nodes. The
-      // simplest way to do this is to clone the node and remove them from the
-      // clone.
-      node = node.cloneNode();
-      let computed = node.querySelector(".ruleview-computedlist");
-      if (computed) {
-        computed.parentNode.removeChild(computed);
-      }
+    let computedLists = node.querySelectorAll(".ruleview-computedlist");
+    for (let computedList of computedLists) {
+      computedList.parentNode.removeChild(computedList);
     }
 
-    let text = node.textContent;
+    let autosizers = node.querySelectorAll(".autosizer");
+    for (let autosizer of autosizers) {
+      autosizer.parentNode.removeChild(autosizer);
+    }
+    let selector = node.querySelector(".ruleview-selector").textContent;
+    let propertyNames = node.querySelectorAll(".ruleview-propertyname");
+    let propertyValues = node.querySelectorAll(".ruleview-propertyvalue");
 
     // Format the rule
     if (osString == "WINNT") {
-      text = text.replace(/{/g, "{\r\n    ");
-      text = text.replace(/;/g, ";\r\n    ");
-      text = text.replace(/\s*}/g, "\r\n}");
+      terminator = "\r\n";
     } else {
-      text = text.replace(/{/g, "{\n    ");
-      text = text.replace(/;/g, ";\n    ");
-      text = text.replace(/\s*}/g, "\n}");
+      terminator = "\n";
     }
 
-    clipboardHelper.copyString(text);
+    let out = selector + " {" + terminator;
+    for (let i = 0; i < propertyNames.length; i++) {
+      let name = propertyNames[i].textContent;
+      let value = propertyValues[i].textContent;
+      out += "    " + name + ": " + value + ";" + terminator;
+    }
+    out += "}" + terminator;
+
+    clipboardHelper.copyString(out);
   },
 
   /**
    * Copy a declaration from the rule view.
    *
    * @param aEvent The event object
    */
   _onCopyDeclaration: function CssRuleView_onCopyDeclaration(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
+
     if (!node.classList.contains("ruleview-property") &&
         !node.classList.contains("ruleview-computed")) {
       while (node = node.parentElement) {
         if (node.classList.contains("ruleview-property") ||
             node.classList.contains("ruleview-computed")) {
           break;
         }
       }
     }
 
     // We need to strip expanded properties from the node because we use
     // node.textContent below, which also gets text from hidden nodes. The
     // simplest way to do this is to clone the node and remove them from the
     // clone.
     node = node.cloneNode();
-    let computed = node.querySelector(".ruleview-computedlist");
-    if (computed) {
-      computed.parentNode.removeChild(computed);
+    let computedLists = node.querySelectorAll(".ruleview-computedlist");
+    for (let computedList of computedLists) {
+      computedList.parentNode.removeChild(computedList);
     }
-    clipboardHelper.copyString(node.textContent);
+
+    let propertyName = node.querySelector(".ruleview-propertyname").textContent;
+    let propertyValue = node.querySelector(".ruleview-propertyvalue").textContent;
+    let out = propertyName + ": " + propertyValue + ";";
+
+    clipboardHelper.copyString(out);
   },
 
   /**
    * Copy a property name from the rule view.
    *
    * @param aEvent The event object
    */
   _onCopyProperty: function CssRuleView_onCopyProperty(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
 
     if (!node.classList.contains("ruleview-propertyname")) {
       node = node.querySelector(".ruleview-propertyname");
     }
 
     if (node) {
       clipboardHelper.copyString(node.textContent);
     }
@@ -1099,16 +1120,19 @@ CssRuleView.prototype = {
  /**
    * Copy a property value from the rule view.
    *
    * @param aEvent The event object
    */
   _onCopyPropertyValue: function CssRuleView_onCopyPropertyValue(aEvent)
   {
     let node = this.doc.popupNode;
+    if (!node) {
+      return;
+    }
 
     if (!node.classList.contains("ruleview-propertyvalue")) {
       node = node.querySelector(".ruleview-propertyvalue");
     }
 
     if (node) {
       clipboardHelper.copyString(node.textContent);
     }
@@ -1135,16 +1159,17 @@ function RuleEditor(aRuleView, aRule)
 
   this._create();
 }
 
 RuleEditor.prototype = {
   _create: function RuleEditor_create()
   {
     this.element = this.doc.createElementNS(HTML_NS, "div");
+    this.element.className = "rule-view-row";
     this.element._ruleEditor = this;
 
     // Give a relative position for the inplace editor's measurement
     // span to be placed absolutely against.
     this.element.style.position = "relative";
 
     // Add the source link.
     let source = createChild(this.element, "div", {
--- a/browser/devtools/styleinspector/test/browser_computedview_bug_703643_context_menu_copy.js
+++ b/browser/devtools/styleinspector/test/browser_computedview_bug_703643_context_menu_copy.js
@@ -3,16 +3,20 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that the style inspector works properly
 
 let doc;
 let stylePanel;
 let cssHtmlTree;
 
+XPCOMUtils.defineLazyGetter(this, "osString", function() {
+  return Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS;
+});
+
 function createDocument()
 {
   doc.body.innerHTML = '<style type="text/css"> ' +
     'span { font-variant: small-caps; color: #000000; } ' +
     '.nomatches {color: #ff0000;}</style> <div id="first" style="margin: 10em; ' +
     'font-size: 14pt; font-family: helvetica, sans-serif; color: #AAA">\n' +
     '<h1>Some header text</h1>\n' +
     '<p id="salutation" style="font-size: 12pt">hi.</p>\n' +
@@ -58,51 +62,54 @@ function runStyleInspectorTests()
   checkCopyProperty()
 }
 
 function checkCopyProperty()
 {
   info("Checking that cssHtmlTree.siBoundCopyDeclaration() returns the " +
        "correct clipboard value");
   let expectedPattern = "color: rgb\\(255, 255, 0\\);";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function CS_boundCopyPropCheck() {
       return checkClipboardData(expectedPattern);
     },
     cssHtmlTree.siBoundCopyDeclaration,
-    checkCopyPropertyName, checkCopyPropertyName);
+    checkCopyPropertyName, function() {
+      failedClipboard(expectedPattern, checkCopyPropertyName);
+    });
 }
 
 function checkCopyPropertyName()
 {
   info("Checking that cssHtmlTree.siBoundCopyProperty() returns the " +
        "correct clipboard value");
   let expectedPattern = "color";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function CS_boundCopyPropNameCheck() {
       return checkClipboardData(expectedPattern);
     },
     cssHtmlTree.siBoundCopyProperty,
-    checkCopyPropertyValue, checkCopyPropertyValue);
+    checkCopyPropertyValue, function() {
+      failedClipboard(expectedPattern, checkCopyPropertyValue);
+    });
 }
 
 function checkCopyPropertyValue()
 {
   info("Checking that cssHtmlTree.siBoundCopyPropertyValue() returns the " +
        "correct clipboard value");
   let expectedPattern = "rgb\\(255, 255, 0\\)";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function CS_boundCopyPropValueCheck() {
       return checkClipboardData(expectedPattern);
     },
     cssHtmlTree.siBoundCopyPropertyValue,
-    checkCopySelection, checkCopySelection);
+    checkCopySelection, function() {
+      failedClipboard(expectedPattern, checkCopySelection);
+    });
 }
 
 function checkCopySelection()
 {
   let contentDocument = stylePanel.iframe.contentDocument;
   let contentWindow = stylePanel.iframe.contentWindow;
   let props = contentDocument.querySelectorAll(".property-view");
   ok(props, "captain, we have the property-view nodes");
@@ -114,31 +121,54 @@ function checkCopySelection()
 
   info("Checking that cssHtmlTree.siBoundCopyPropertyValue() " +
        " returns the correct clipboard value");
 
   let expectedPattern = "color: rgb\\(255, 255, 0\\)[\\r\\n]+" +
                  "font-family: helvetica,sans-serif[\\r\\n]+" +
                  "font-size: 16px[\\r\\n]+" +
                  "font-variant: small-caps[\\r\\n]*";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function CS_boundCopyCheck() {
       return checkClipboardData(expectedPattern);
     },
-    cssHtmlTree.siBoundCopy, closeStyleInspector, closeStyleInspector);
+    cssHtmlTree.siBoundCopy, closeStyleInspector, function() {
+      failedClipboard(expectedPattern, closeStyleInspector);
+    });
 }
 
 function checkClipboardData(aExpectedPattern)
 {
   let actual = SpecialPowers.getClipboardData("text/unicode");
   let expectedRegExp = new RegExp(aExpectedPattern, "g");
   return expectedRegExp.test(actual);
 }
 
+function failedClipboard(aExpectedPattern, aCallback)
+{
+  // Format expected text for comparison
+  let terminator = osString == "WINNT" ? "\r\n" : "\n";
+  aExpectedPattern = aExpectedPattern.replace(/\[\\r\\n\][+*]/g, terminator);
+  aExpectedPattern = aExpectedPattern.replace(/\\\(/g, "(");
+  aExpectedPattern = aExpectedPattern.replace(/\\\)/g, ")");
+
+  let actual = SpecialPowers.getClipboardData("text/unicode");
+
+  // Trim the right hand side of our strings. This is because expectedPattern
+  // accounts for windows sometimes adding a newline to our copied data.
+  aExpectedPattern = aExpectedPattern.trimRight();
+  actual = actual.trimRight();
+
+  dump("TEST-UNEXPECTED-FAIL | Clipboard text does not match expected ... " +
+    "results (escaped for accurate comparison):\n");
+  info("Actual: " + escape(actual));
+  info("Expected: " + escape(aExpectedPattern));
+  aCallback();
+}
+
 function closeStyleInspector()
 {
   Services.obs.addObserver(finishUp, "StyleInspector-closed", false);
   stylePanel.close();
 }
 
 function finishUp()
 {
--- a/browser/devtools/styleinspector/test/browser_ruleview_bug_703643_context_menu_copy.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_bug_703643_context_menu_copy.js
@@ -1,13 +1,20 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 let doc;
+let tempScope = {};
+Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
+let inplaceEditor = tempScope._getInplaceEditorForSpan;
+
+XPCOMUtils.defineLazyGetter(this, "osString", function() {
+  return Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS;
+});
 
 function createDocument()
 {
   doc.body.innerHTML = '<style type="text/css"> ' +
     'html { color: #000000; } ' +
     'span { font-variant: small-caps; color: #000000; } ' +
     '.nomatches {color: #ff0000;}</style> <div id="first" style="margin: 10em; ' +
     'font-size: 14pt; font-family: helvetica, sans-serif; color: #AAA">\n' +
@@ -34,16 +41,40 @@ function openInspector()
   ok(!InspectorUI.inspecting, "Inspector is not highlighting");
   ok(InspectorUI.store.isEmpty(), "Inspector.store is empty");
 
   Services.obs.addObserver(inspectorUIOpen,
     InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED, false);
   InspectorUI.openInspectorUI();
 }
 
+function waitForEditorFocus(aParent, aCallback)
+{
+  aParent.addEventListener("focus", function onFocus(evt) {
+    if (inplaceEditor(evt.target)) {
+      aParent.removeEventListener("focus", onFocus, true);
+      let editor = inplaceEditor(evt.target);
+      executeSoon(function() {
+        aCallback(editor);
+      });
+    }
+  }, true);
+}
+
+function waitForEditorBlur(aEditor, aCallback)
+{
+  let input = aEditor.input;
+  input.addEventListener("blur", function onBlur() {
+    input.removeEventListener("blur", onBlur, false);
+    executeSoon(function() {
+      aCallback();
+    });
+  }, false);
+}
+
 function inspectorUIOpen()
 {
   Services.obs.removeObserver(inspectorUIOpen,
     InspectorUI.INSPECTOR_NOTIFICATIONS.OPENED, false);
 
   // Make sure the inspector is open.
   ok(InspectorUI.inspecting, "Inspector is highlighting");
   ok(!InspectorUI.treePanel.isOpen(), "Inspector Tree Panel is not open");
@@ -73,22 +104,23 @@ function testClip()
     info("Checking that _onCopyRule() returns " +
          "the correct clipboard value");
     let expectedPattern = "element {[\\r\\n]+" +
       "    margin: 10em;[\\r\\n]+" +
       "    font-size: 14pt;[\\r\\n]+" +
       "    font-family: helvetica,sans-serif;[\\r\\n]+" +
       "    color: rgb\\(170, 170, 170\\);[\\r\\n]+" +
       "}[\\r\\n]*";
-    info("Expected pattern: " + expectedPattern);
 
     SimpleTest.waitForClipboard(function IUI_boundCopyPropCheck() {
         return checkClipboardData(expectedPattern);
       },
-      checkCopyRule, checkCopyProperty, checkCopyProperty);
+      checkCopyRule, checkCopyRuleWithEditorSelected, function() {
+        failedClipboard(expectedPattern, checkCopyRuleWithEditorSelected);
+      });
   });
 }
 
 function checkCopyRule() {
   let ruleView = document.querySelector("#devtools-sidebar-iframe-ruleview");
   let contentDoc = ruleView.contentDocument;
   let props = contentDoc.querySelectorAll(".ruleview-property");
 
@@ -102,94 +134,187 @@ function checkCopyRule() {
   is(propValue, "helvetica,sans-serif", "checking property value");
 
   // We need the context menu to open in the correct place in order for
   // popupNode to be propertly set.
   EventUtils.synthesizeMouse(prop, 1, 1, { type: "contextmenu", button: 2 },
     ruleView.contentWindow);
 
   InspectorUI.ruleView._boundCopyRule();
+  let menu = contentDoc.querySelector("#rule-view-context-menu");
+  ok(menu, "we have the context menu");
+  menu.hidePopup();
+}
+
+function checkCopyRuleWithEditorSelected()
+{
+  let ruleView = document.querySelector("#devtools-sidebar-iframe-ruleview");
+  let contentDoc = ruleView.contentDocument;
+  let rows = contentDoc.querySelectorAll(".rule-view-row");
+  let propNodes = contentDoc.querySelectorAll(".ruleview-property");
+  let propNode = propNodes[2];
+  let propNameNode = propNode.querySelector(".ruleview-propertyname");
+
+  ok(propNameNode, "we have the property name node");
+
+  info("Checking that _boundCopyRule()  returns the correct clipboard value");
+  let expectedPattern = "element {[\\r\\n]+" +
+    "    margin: 10em;[\\r\\n]+" +
+    "    font-size: 14pt;[\\r\\n]+" +
+    "    font-family: helvetica,sans-serif;[\\r\\n]+" +
+    "    color: rgb\\(170, 170, 170\\);[\\r\\n]+" +
+    "}[\\r\\n]*";
+
+  let elementRuleEditor = rows[0]._ruleEditor;
+  waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
+    ok(aEditor, "we have the editor");
+
+    waitForBlur.editor = aEditor;
+
+    // We need the context menu to open in the correct place in order for
+    // popupNode to be propertly set.
+    EventUtils.synthesizeMouse(aEditor.input, 1, 1,
+      { type: "contextmenu", button: 2 }, ruleView.contentWindow);
+
+    SimpleTest.waitForClipboard(function IUI_boundCopyCheckWithSelection() {
+      let menu = contentDoc.querySelector("#rule-view-context-menu");
+      ok(menu, "we have the context menu");
+      menu.hidePopup();
+
+      return checkClipboardData(expectedPattern);
+    }, InspectorUI.ruleView._boundCopyRule, waitForBlur, function() {
+      failedClipboard(expectedPattern, checkCopyProperty);
+    });
+  });
+  EventUtils.synthesizeMouse(propNameNode, 1, 1, { }, ruleView.contentWindow);
+}
+
+function waitForBlur()
+{
+  waitForEditorBlur(waitForBlur.editor, function() {
+    waitForBlur.editor = null;
+    checkCopyProperty();
+  });
+  waitForBlur.editor.input.blur();
 }
 
 function checkCopyProperty()
 {
+  let ruleView = document.querySelector("#devtools-sidebar-iframe-ruleview");
+  let contentDoc = ruleView.contentDocument;
+  let props = contentDoc.querySelectorAll(".ruleview-property");
+  let prop = props[2];
+
   info("Checking that _onCopyDeclaration() returns " +
        "the correct clipboard value");
   let expectedPattern = "font-family: helvetica,sans-serif;";
-  info("Expected pattern: " + expectedPattern);
+
+  // We need the context menu to open in the correct place in order for
+  // popupNode to be propertly set.
+  EventUtils.synthesizeMouse(prop, 1, 1, { type: "contextmenu", button: 2 },
+    ruleView.contentWindow);
 
   SimpleTest.waitForClipboard(function IUI_boundCopyPropCheck() {
-      return checkClipboardData(expectedPattern);
-    },
-    InspectorUI.ruleView._boundCopyDeclaration,
-    checkCopyPropertyName, checkCopyPropertyName);
+    return checkClipboardData(expectedPattern);
+  },
+  InspectorUI.ruleView._boundCopyDeclaration,
+  checkCopyPropertyName, function() {
+    failedClipboard(expectedPattern, checkCopyPropertyName);
+  });
 }
 
 function checkCopyPropertyName()
 {
   info("Checking that _onCopyProperty() returns " +
        "the correct clipboard value");
   let expectedPattern = "font-family";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function IUI_boundCopyPropNameCheck() {
-      return checkClipboardData(expectedPattern);
-    },
-    InspectorUI.ruleView._boundCopyProperty,
-    checkCopyPropertyValue, checkCopyPropertyValue);
+    return checkClipboardData(expectedPattern);
+  },
+  InspectorUI.ruleView._boundCopyProperty,
+  checkCopyPropertyValue, function() {
+    failedClipboard(expectedPattern, checkCopyPropertyValue);
+  });
 }
 
 function checkCopyPropertyValue()
 {
   info("Checking that _onCopyPropertyValue() " +
        " returns the correct clipboard value");
   let expectedPattern = "helvetica,sans-serif";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function IUI_boundCopyPropValueCheck() {
-      return checkClipboardData(expectedPattern);
-    },
-    InspectorUI.ruleView._boundCopyPropertyValue,
-    checkCopySelection, checkCopySelection);
+    return checkClipboardData(expectedPattern);
+  },
+  InspectorUI.ruleView._boundCopyPropertyValue,
+  checkCopySelection, function() {
+    failedClipboard(expectedPattern, checkCopySelection);
+  });
 }
 
 function checkCopySelection()
 {
   let ruleView = document.querySelector("#devtools-sidebar-iframe-ruleview");
   let contentDoc = ruleView.contentDocument;
   let props = contentDoc.querySelectorAll(".ruleview-property");
 
   let range = document.createRange();
   range.setStart(props[0], 0);
   range.setEnd(props[4], 8);
-  ruleView.contentWindow.getSelection().addRange(range);
 
-  info("Checking that _onCopy()  returns the correct" +
-       "clipboard value");
+  let selection = ruleView.contentWindow.getSelection();
+  selection.addRange(range);
+
+  info("Checking that _boundCopy()  returns the correct" +
+    "clipboard value");
   let expectedPattern = "    margin: 10em;[\\r\\n]+" +
                         "    font-size: 14pt;[\\r\\n]+" +
                         "    font-family: helvetica,sans-serif;[\\r\\n]+" +
                         "    color: rgb\\(170, 170, 170\\);[\\r\\n]+" +
                         "}[\\r\\n]+" +
                         "html {[\\r\\n]+" +
                         "    color: rgb\\(0, 0, 0\\);[\\r\\n]*";
-  info("Expected pattern: " + expectedPattern);
 
   SimpleTest.waitForClipboard(function IUI_boundCopyCheck() {
-      return checkClipboardData(expectedPattern);
-    },InspectorUI.ruleView._boundCopy, finishup, finishup);
+    return checkClipboardData(expectedPattern);
+  },InspectorUI.ruleView._boundCopy, finishup, function() {
+    failedClipboard(expectedPattern, finishup);
+  });
 }
 
 function checkClipboardData(aExpectedPattern)
 {
   let actual = SpecialPowers.getClipboardData("text/unicode");
   let expectedRegExp = new RegExp(aExpectedPattern, "g");
   return expectedRegExp.test(actual);
 }
 
+function failedClipboard(aExpectedPattern, aCallback)
+{
+  // Format expected text for comparison
+  let terminator = osString == "WINNT" ? "\r\n" : "\n";
+  aExpectedPattern = aExpectedPattern.replace(/\[\\r\\n\][+*]/g, terminator);
+  aExpectedPattern = aExpectedPattern.replace(/\\\(/g, "(");
+  aExpectedPattern = aExpectedPattern.replace(/\\\)/g, ")");
+
+  let actual = SpecialPowers.getClipboardData("text/unicode");
+
+  // Trim the right hand side of our strings. This is because expectedPattern
+  // accounts for windows sometimes adding a newline to our copied data.
+  aExpectedPattern = aExpectedPattern.trimRight();
+  actual = actual.trimRight();
+
+  dump("TEST-UNEXPECTED-FAIL | Clipboard text does not match expected ... " +
+    "results (escaped for accurate comparison):\n");
+  info("Actual: " + escape(actual));
+  info("Expected: " + escape(aExpectedPattern));
+  aCallback();
+}
+
 function finishup()
 {
   InspectorUI.hideSidebar();
   InspectorUI.closeInspectorUI();
   gBrowser.removeCurrentTab();
   doc = null;
   finish();
 }
--- a/browser/devtools/webconsole/test/browser_gcli_helpers.js
+++ b/browser/devtools/webconsole/test/browser_gcli_helpers.js
@@ -15,17 +15,17 @@ let gcliterm;
 registerCleanupFunction(function() {
   gcliterm = undefined;
   hud = undefined;
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", true);
-  addTab("http://example.com/browser/browser/devtools/webconsole/test//test-console.html");
+  addTab("http://example.com/browser/browser/devtools/webconsole/test/test-console.html");
   browser.addEventListener("DOMContentLoaded", onLoad, false);
 }
 
 function onLoad() {
   browser.removeEventListener("DOMContentLoaded", onLoad, false);
 
   openConsole();
   hud = HUDService.getHudByWindow(content);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_579412_input_focus.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_579412_input_focus.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the input field is focused when the console is opened.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_580001_closing_after_completion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_580001_closing_after_completion.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests to ensure that errors don't appear when the console is closed while a
 // completion is being performed.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_580400_groups.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_580400_groups.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that console groups behave properly.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_582201_duplicate_errors.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_582201_duplicate_errors.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that exceptions thrown by content don't show up twice in the Web
 // Console.
 
-const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-duplicate-error.html";
+const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-duplicate-error.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   expectUncaughtException();
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_583816_No_input_and_Tab_key_pressed.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_583816_No_input_and_Tab_key_pressed.js
@@ -32,17 +32,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/browser/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_587617_output_copy.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_587617_output_copy.js
@@ -3,17 +3,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_588967_input_expansion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_588967_input_expansion.js
@@ -31,17 +31,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
@@ -3,17 +3,17 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 let HUD;
 
 let outputItem;
 
 function tabLoad1(aEvent) {
   browser.removeEventListener(aEvent.type, arguments.callee, true);
 
   openConsole();
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_595934_message_categories.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_595934_message_categories.js
@@ -3,17 +3,17 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/test//";
+const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/test/";
 const TESTS = [
   { // #0
     file: "test-bug-595934-css-loader.html",
     category: "CSS Loader",
     matchString: "text/css",
   },
   { // #1
     file: "test-bug-595934-dom-events.html",
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_598357_jsterm_output.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_598357_jsterm_output.js
@@ -3,17 +3,17 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 let testEnded = false;
 let pos = -1;
 
 let dateNow = Date.now();
 
 let inputValues = [
   // [showsPropertyPanel?, input value, expected output format,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_618078_network_exceptions.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_618078_network_exceptions.js
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that network log messages bring up the network panel.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-618078-network-exceptions.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-618078-network-exceptions.html";
 
 let testEnded = false;
 
 let TestObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
   observe: function test_observe(aSubject)
   {
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_618311_close_panels.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_618311_close_panels.js
@@ -31,17 +31,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_618311_private_browsing.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_618311_private_browsing.js
@@ -31,17 +31,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 let pb = Cc["@mozilla.org/privatebrowsing;1"].
          getService(Ci.nsIPrivateBrowsingService);
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_621644_jsterm_dollar.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_621644_jsterm_dollar.js
@@ -2,17 +2,17 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Sucan <mihai.sucan@gmail.com>
  */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-621644-jsterm-dollar.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-621644-jsterm-dollar.html";
 
 function tabLoad(aEvent) {
   browser.removeEventListener(aEvent.type, arguments.callee, true);
 
   waitForFocus(function () {
     openConsole();
 
     let hudId = HUDService.getHudIdByWindow(content);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-632275-getters.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-632275-getters.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js
@@ -31,17 +31,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-632347-iterators-generators.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-632347-iterators-generators.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_704295.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_704295.js
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests for bug 704295
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_completion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_completion.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that code completion works properly.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_console_logging_api.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_console_logging_api.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the basic console.log()-style APIs and filtering work.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_consoleonpage.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_consoleonpage.js
@@ -4,17 +4,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Julian Viereck <jviereck@mozilla.com>
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-own-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-own-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test()
 {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
--- a/browser/devtools/webconsole/test/browser_webconsole_execution_scope.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_execution_scope.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that commands run by the user are executed in content space.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_for_of.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_for_of.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // A for-of loop in Web Console code can loop over a content NodeList.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-for-of.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-for-of.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_history.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_history.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests the console history feature accessed via the up and down arrow keys.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 // Constants used for defining the direction of JSTerm input history navigation.
 const HISTORY_BACK = -1;
 const HISTORY_FORWARD = 1;
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_hud_getters.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_hud_getters.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the HUD can be accessed via the HUD references in the HUD
 // service.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_js_input_and_output_styling.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_js_input_and_output_styling.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the correct CSS styles are applied to the lines of console
 // output.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_js_input_expansion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_js_input_expansion.js
@@ -35,17 +35,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the input box expands as the user types long lines.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_jsterm.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_jsterm.js
@@ -34,17 +34,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 let jsterm;
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
--- a/browser/devtools/webconsole/test/browser_webconsole_null_and_undefined_output.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_null_and_undefined_output.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Test that JavaScript expressions that evaluate to null or undefined produce
 // meaningful output.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_output_order.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_output_order.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that any output created from calls to the console API comes after the
 // echoed JavaScript.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_property_panel.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_property_panel.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests the functionality of the "property panel", which allows JavaScript
 // objects and DOM nodes to be inspected.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/browser/devtools/webconsole/test/browser_webconsole_property_provider.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_property_provider.js
@@ -36,17 +36,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests the property provider, which is part of the code completion
 // infrastructure.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
 
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.gcli.enable");
 });
 
 function test() {
   Services.prefs.setBoolPref("devtools.gcli.enable", false);
   addTab(TEST_URI);
--- a/content/base/src/nsCrossSiteListenerProxy.cpp
+++ b/content/base/src/nsCrossSiteListenerProxy.cpp
@@ -634,17 +634,23 @@ nsCORSListenerProxy::CheckRequestApprove
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCORSListenerProxy::OnStopRequest(nsIRequest* aRequest,
                                    nsISupports* aContext,
                                    nsresult aStatusCode)
 {
-  return mOuterListener->OnStopRequest(aRequest, aContext, aStatusCode);
+  nsresult rv = mOuterListener->OnStopRequest(aRequest, aContext, aStatusCode);
+  mOuterListener = nsnull;
+  mOuterNotificationCallbacks = nsnull;
+  mRedirectCallback = nsnull;
+  mOldRedirectChannel = nsnull;
+  mNewRedirectChannel = nsnull;
+  return rv;
 }
 
 NS_IMETHODIMP
 nsCORSListenerProxy::OnDataAvailable(nsIRequest* aRequest,
                                      nsISupports* aContext, 
                                      nsIInputStream* aInputStream,
                                      PRUint32 aOffset,
                                      PRUint32 aCount)
@@ -1021,16 +1027,19 @@ nsCORSPreflightListener::OnStartRequest(
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCORSPreflightListener::OnStopRequest(nsIRequest *aRequest,
                                        nsISupports *aContext,
                                        nsresult aStatus)
 {
+  mOuterChannel = nsnull;
+  mOuterListener = nsnull;
+  mOuterContext = nsnull;
   return NS_OK;
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
 nsCORSPreflightListener::OnDataAvailable(nsIRequest *aRequest,
                                          nsISupports *ctxt,
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -2497,16 +2497,17 @@ nsXMLHttpRequest::ChangeStateToDone()
   }
 
   if (mErrorLoad) {
     // By nulling out channel here we make it so that Send() can test
     // for that and throw. Also calling the various status
     // methods/members will not throw.
     // This matches what IE does.
     mChannel = nsnull;
+    mCORSPreflightChannel = nsnull;
   }
   else if (!(mState & XML_HTTP_REQUEST_GOT_FINAL_STOP)) {
     // We're a multipart request, so we're not done. Reset to opened.
     ChangeState(XML_HTTP_REQUEST_OPENED);
   }
 }
 
 NS_IMETHODIMP
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug689916-regexp.js
@@ -0,0 +1,4 @@
+/* should not crash on SPARC */
+var http_string = 'https://easylist-downloads.adblockplus.org/easylist.txt';
+var regexp = /^[\w\-]+:\/+(?!\/)(?:[^.\/]+\.)*?reports\.adblockplus\.org(?:[\x00-\x24\x26-\x2C\x2F\x3A-\x40\x5B-\x5E\x60\x7B-\x80]|$)/i;
+assertEq(http_string.match(regexp), null);
--- a/toolkit/content/PopupNotifications.jsm
+++ b/toolkit/content/PopupNotifications.jsm
@@ -602,16 +602,19 @@ PopupNotifications.prototype = {
       if (notificationObj.options.removeOnDismissal)
         this._remove(notificationObj);
       else {
         notificationObj.dismissed = true;
         this._fireCallback(notificationObj, NOTIFICATION_EVENT_DISMISSED);
       }
     }, this);
 
+    while (this.panel.lastChild)
+      this.panel.removeChild(this.panel.lastChild);
+
     this._update();
   },
 
   _onButtonCommand: function PopupNotifications_onButtonCommand(event) {
     // Need to find the associated notification object, which is a bit tricky
     // since it isn't associated with the button directly - this is kind of
     // gross and very dependent on the structure of the popupnotification
     // binding's content.
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -464,16 +464,18 @@ LoadDirsIntoArray(nsCOMArray<nsIFile>& a
 
     nsCAutoString leaf;
     appended->GetNativeLeafName(leaf);
     if (!Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi"))) {
       LoadDirIntoArray(appended,
                        aAppendList,
                        aDirectories);
     }
+    else if (NS_SUCCEEDED(appended->Exists(&exists)) && exists)
+      aDirectories.AppendObject(appended);
   }
 }
 
 NS_IMETHODIMP
 nsXREDirProvider::GetFiles(const char* aProperty, nsISimpleEnumerator** aResult)
 {
   nsresult rv;
 
--- a/tools/profiler/TableTicker.cpp
+++ b/tools/profiler/TableTicker.cpp
@@ -508,17 +508,17 @@ void TableTicker::doBacktrace(ThreadProf
   void *stackEnd = reinterpret_cast<void*>(-1);
   if (pt)
     stackEnd = static_cast<char*>(pthread_get_stackaddr_np(pt));
   nsresult rv = FramePointerStackWalk(StackWalkCallback, 0, &array, reinterpret_cast<void**>(aSample->fp), stackEnd);
 #else
   nsresult rv = NS_StackWalk(StackWalkCallback, 0, &array, thread);
 #endif
   if (NS_SUCCEEDED(rv)) {
-    aProfile.addTag(ProfileEntry('s', "(root)", 0));
+    aProfile.addTag(ProfileEntry('s', "(root)"));
 
     for (size_t i = array.count; i > 0; --i) {
       aProfile.addTag(ProfileEntry('l', (const char*)array.array[i - 1]));
     }
   }
 }
 #endif