Backed out changesets 073791f33ab7 and 7ac5779a426c (bug 859756) for causing intermittent Windows build failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 17 May 2013 17:30:20 -0400
changeset 132282 ecdfb8bb501eef34b62dec14b74ada075ab6452a
parent 132281 aaf5d70ba6936c7b4e811a3c577cdd6fe97a5794
child 132283 d7155fcfc6a964f7b1ecdbe561f2bc559871e067
child 132290 65c8cc6bd59c7912f75ede9474599be17e4c3c11
push id28193
push userryanvm@gmail.com
push dateFri, 17 May 2013 21:34:56 +0000
treeherdermozilla-inbound@d7155fcfc6a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs859756
milestone24.0a1
backs out073791f33ab746a9c0e9ee260f21416930a6a8dd
7ac5779a426c1982572b751f13332ff5512350e1
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
Backed out changesets 073791f33ab7 and 7ac5779a426c (bug 859756) for causing intermittent Windows build failures. CLOSED TREE
browser/devtools/shared/DeveloperToolbar.jsm
browser/devtools/webconsole/test/Makefile.in
browser/devtools/webconsole/test/browser_console_nsiconsolemessage.js
browser/devtools/webconsole/webconsole.js
js/xpconnect/idl/nsIScriptError.idl
js/xpconnect/src/nsScriptError.cpp
toolkit/devtools/debugger/dbg-client.jsm
toolkit/devtools/webconsole/WebConsoleUtils.jsm
toolkit/devtools/webconsole/dbg-webconsole-actors.js
toolkit/devtools/webconsole/test/Makefile.in
toolkit/devtools/webconsole/test/common.js
toolkit/devtools/webconsole/test/test_cached_messages.html
toolkit/devtools/webconsole/test/test_nsiconsolemessage.html
xpcom/base/Makefile.in
xpcom/base/nsConsoleMessage.cpp
xpcom/base/nsConsoleMessage.h
xpcom/base/nsIConsoleMessage.idl
xpcom/build/XPCOMModule.inc
xpcom/build/nsXPComInit.cpp
--- a/browser/devtools/shared/DeveloperToolbar.jsm
+++ b/browser/devtools/shared/DeveloperToolbar.jsm
@@ -4,34 +4,32 @@
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = [ "DeveloperToolbar", "CommandUtils" ];
 
 const NS_XHTML = "http://www.w3.org/1999/xhtml";
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource:///modules/devtools/Commands.jsm");
 
 const Node = Components.interfaces.nsIDOMNode;
 
 XPCOMUtils.defineLazyModuleGetter(this, "console",
                                   "resource://gre/modules/devtools/Console.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "gcli",
                                   "resource://gre/modules/devtools/gcli.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "CmdCommands",
                                   "resource:///modules/devtools/BuiltinCommands.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "ConsoleServiceListener",
+XPCOMUtils.defineLazyModuleGetter(this, "PageErrorListener",
                                   "resource://gre/modules/devtools/WebConsoleUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
                                   "resource://gre/modules/PluralForm.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "devtools",
                                   "resource://gre/modules/devtools/Loader.jsm");
 
@@ -432,18 +430,18 @@ DeveloperToolbar.prototype._initErrorsCo
 {
   let tabId = aTab.linkedPanel;
   if (tabId in this._errorsCount) {
     this._updateErrorsCount();
     return;
   }
 
   let window = aTab.linkedBrowser.contentWindow;
-  let listener = new ConsoleServiceListener(window, {
-    onConsoleServiceMessage: this._onPageError.bind(this, tabId),
+  let listener = new PageErrorListener(window, {
+    onPageError: this._onPageError.bind(this, tabId),
   });
   listener.init();
 
   this._errorListeners[tabId] = listener;
   this._errorsCount[tabId] = 0;
   this._warningsCount[tabId] = 0;
 
   let messages = listener.getCachedMessages();
@@ -590,18 +588,17 @@ DeveloperToolbar.prototype.handleEvent =
  * @private
  * @param string aTabId the ID of the tab from where the page error comes.
  * @param object aPageError the page error object received from the
  * PageErrorListener.
  */
 DeveloperToolbar.prototype._onPageError =
 function DT__onPageError(aTabId, aPageError)
 {
-  if (!(aPageError instanceof Ci.nsIScriptError) ||
-      aPageError.category == "CSS Parser" ||
+  if (aPageError.category == "CSS Parser" ||
       aPageError.category == "CSS Loader") {
     return;
   }
   if ((aPageError.flags & aPageError.warningFlag) ||
       (aPageError.flags & aPageError.strictFlag)) {
     this._warningsCount[aTabId]++;
   } else {
     this._errorsCount[aTabId]++;
--- a/browser/devtools/webconsole/test/Makefile.in
+++ b/browser/devtools/webconsole/test/Makefile.in
@@ -125,17 +125,16 @@ MOCHITEST_BROWSER_FILES = \
 	browser_webconsole_bug_837351_securityerrors.js \
 	browser_bug_865871_variables_view_close_on_esc_key.js \
 	browser_bug_865288_repeat_different_objects.js \
 	browser_jsterm_inspect.js \
 	browser_bug_869003_inspect_cross_domain_object.js \
 	browser_bug_862916_console_dir_and_filter_off.js \
 	browser_console_native_getters.js \
 	browser_bug_871156_ctrlw_close_tab.js \
-	browser_console_nsiconsolemessage.js \
 	head.js \
 	$(NULL)
 
 ifeq ($(OS_ARCH), Darwin)
 MOCHITEST_BROWSER_FILES += \
 	browser_webconsole_bug_804845_ctrl_key_nav.js \
         $(NULL)
 endif
deleted file mode 100644
--- a/browser/devtools/webconsole/test/browser_console_nsiconsolemessage.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Check that nsIConsoleMessages show in the Browser Console and in the Web
-// Console. See bug 859756.
-
-const TEST_URI = "data:text/html;charset=utf8,<title>bug859756</title>\n" +
-                 "<p>hello world\n<p>nsIConsoleMessages ftw!";
-
-let gWebConsole, gJSTerm, gVariablesView;
-
-function test()
-{
-  addTab(TEST_URI);
-  browser.addEventListener("load", function onLoad() {
-    browser.removeEventListener("load", onLoad, true);
-
-    // Test for cached nsIConsoleMessages.
-    sendMessage("test1 for bug859756", "cat2012");
-
-    openConsole(null, consoleOpened);
-  }, true);
-}
-
-function sendMessage(aMessage, aCategory)
-{
-  let windowID = WebConsoleUtils.getInnerWindowId(content);
-  let consoleMsg = Cc["@mozilla.org/consolemessage;1"]
-                   .createInstance(Ci.nsIConsoleMessage);
-  consoleMsg.initMessage(aMessage, aCategory, windowID);
-  Services.console.logMessage(consoleMsg);
-}
-
-function consoleOpened(hud)
-{
-  gWebConsole = hud;
-  gJSTerm = hud.jsterm;
-
-  // Send a message with no window ID.
-  Services.console.logStringMessage("do-not-show-me");
-
-  sendMessage("test2 for bug859756", "cat2013");
-
-  waitForMessages({
-    webconsole: hud,
-    messages: [
-      {
-        text: "test1 for bug859756",
-        category: CATEGORY_JS,
-      },
-      {
-        text: "test2 for bug859756",
-        category: CATEGORY_JS,
-      },
-    ],
-  }).then(onLogMessages);
-}
-
-function onLogMessages()
-{
-  let text = gWebConsole.outputNode.textContent;
-  is(text.indexOf("do-not-show-me"), -1,
-     "message without window ID is not displayed");
-  closeConsole(null, onWebConsoleClose);
-}
-
-function onWebConsoleClose()
-{
-  HUDConsoleUI.toggleBrowserConsole().then(onBrowserConsoleOpen);
-}
-
-function onBrowserConsoleOpen(hud)
-{
-  waitForMessages({
-    webconsole: hud,
-    messages: [
-      {
-        text: "test1 for bug859756",
-        category: CATEGORY_JS,
-      },
-      {
-        text: "test2 for bug859756",
-        category: CATEGORY_JS,
-      },
-      {
-        text: "do-not-show-me",
-        category: CATEGORY_JS,
-      },
-    ],
-  }).then(finishTest);
-}
--- a/browser/devtools/webconsole/webconsole.js
+++ b/browser/devtools/webconsole/webconsole.js
@@ -951,24 +951,21 @@ WebConsoleFrame.prototype = {
   {
     if (!aRemoteMessages.length) {
       return;
     }
 
     aRemoteMessages.forEach(function(aMessage) {
       switch (aMessage._type) {
         case "PageError": {
-          let category = Utils.categoryForConsoleMessage(aMessage);
+          let category = Utils.categoryForScriptError(aMessage);
           this.outputMessage(category, this.reportPageError,
                              [category, aMessage]);
           break;
         }
-        case "LogMessage":
-          this.handleLogMessage(aMessage);
-          break;
         case "ConsoleAPI":
           this.outputMessage(CATEGORY_WEBDEV, this.logConsoleAPIMessage,
                              [aMessage]);
           break;
       }
     }, this);
   },
 
@@ -1186,37 +1183,21 @@ WebConsoleFrame.prototype = {
    * Handle PageError objects received from the server. This method outputs the
    * given error.
    *
    * @param nsIScriptError aPageError
    *        The error received from the server.
    */
   handlePageError: function WCF_handlePageError(aPageError)
   {
-    let category = Utils.categoryForConsoleMessage(aPageError);
+    let category = Utils.categoryForScriptError(aPageError);
     this.outputMessage(category, this.reportPageError, [category, aPageError]);
   },
 
   /**
-   * Handle log messages received from the server. This method outputs the given
-   * message.
-   *
-   * @param object aPacket
-   *        The message packet received from the server.
-   */
-  handleLogMessage: function WCF_handleLogMessage(aPacket)
-  {
-    let category = Utils.categoryForConsoleMessage(aPacket.category);
-    this.outputMessage(category, () => {
-      return this.createMessageNode(category, SEVERITY_LOG, aPacket.message,
-                                    null, null, null, null, aPacket.timeStamp);
-    });
-  },
-
-  /**
    * Log network event.
    *
    * @param object aActorId
    *        The network event actor ID to log.
    * @return nsIDOMElement|null
    *         The message element to display in the Web Console output.
    */
   logNetEvent: function WCF_logNetEvent(aActorId)
@@ -4351,27 +4332,27 @@ var Utils = {
                          aOutputNode.lastChild.clientHeight : 0;
     let scrollBox = aOutputNode.scrollBoxObject.element;
 
     return scrollBox.scrollTop + scrollBox.clientHeight >=
            scrollBox.scrollHeight - lastNodeHeight / 2;
   },
 
   /**
-   * Determine the category of a given nsIConsoleMessage.
+   * Determine the category of a given nsIScriptError.
    *
-   * @param nsIConsoleMessage aMessage
-   *        The message you want to determine the category for.
+   * @param nsIScriptError aScriptError
+   *        The script error you want to determine the category for.
    * @return CATEGORY_JS|CATEGORY_CSS|CATEGORY_SECURITY
-   *         Depending on the message kind CATEGORY_JS, CATEGORY_CSS, or
+   *         Depending on the script error CATEGORY_JS, CATEGORY_CSS, or
    *         CATEGORY_SECURITY can be returned.
    */
-  categoryForConsoleMessage: function Utils_categoryForConsoleMessage(aMessage)
+  categoryForScriptError: function Utils_categoryForScriptError(aScriptError)
   {
-    switch (aMessage.category) {
+    switch (aScriptError.category) {
       case "CSS Parser":
       case "CSS Loader":
         return CATEGORY_CSS;
 
       case "Mixed Content Blocker":
       case "CSP":
         return CATEGORY_SECURITY;
 
@@ -4522,17 +4503,16 @@ CommandController.prototype = {
  *        The target that the console will connect to.
  */
 function WebConsoleConnectionProxy(aWebConsole, aTarget)
 {
   this.owner = aWebConsole;
   this.target = aTarget;
 
   this._onPageError = this._onPageError.bind(this);
-  this._onLogMessage = this._onLogMessage.bind(this);
   this._onConsoleAPICall = this._onConsoleAPICall.bind(this);
   this._onNetworkEvent = this._onNetworkEvent.bind(this);
   this._onNetworkEventUpdate = this._onNetworkEventUpdate.bind(this);
   this._onFileActivity = this._onFileActivity.bind(this);
   this._onTabNavigated = this._onTabNavigated.bind(this);
   this._onAttachConsole = this._onAttachConsole.bind(this);
   this._onCachedMessages = this._onCachedMessages.bind(this);
   this._connectionTimeout = this._connectionTimeout.bind(this);
@@ -4626,17 +4606,16 @@ WebConsoleConnectionProxy.prototype = {
       this._connectTimer.cancel();
       this._connectTimer = null;
     }.bind(this), function _onFailure() {
       this._connectTimer = null;
     }.bind(this));
 
     let client = this.client = this.target.client;
 
-    client.addListener("logMessage", this._onLogMessage);
     client.addListener("pageError", this._onPageError);
     client.addListener("consoleAPICall", this._onConsoleAPICall);
     client.addListener("networkEvent", this._onNetworkEvent);
     client.addListener("networkEventUpdate", this._onNetworkEventUpdate);
     client.addListener("fileActivity", this._onFileActivity);
     this.target.on("will-navigate", this._onTabNavigated);
     this.target.on("navigate", this._onTabNavigated);
 
@@ -4748,33 +4727,16 @@ WebConsoleConnectionProxy.prototype = {
   _onPageError: function WCCP__onPageError(aType, aPacket)
   {
     if (this.owner && aPacket.from == this._consoleActor) {
       this.owner.handlePageError(aPacket.pageError);
     }
   },
 
   /**
-   * The "logMessage" message type handler. We redirect any message to the UI
-   * for displaying.
-   *
-   * @private
-   * @param string aType
-   *        Message type.
-   * @param object aPacket
-   *        The message received from the server.
-   */
-  _onLogMessage: function WCCP__onLogMessage(aType, aPacket)
-  {
-    if (this.owner && aPacket.from == this._consoleActor) {
-      this.owner.handleLogMessage(aPacket);
-    }
-  },
-
-  /**
    * The "consoleAPICall" message type handler. We redirect any message to
    * the UI for displaying.
    *
    * @private
    * @param string aType
    *        Message type.
    * @param object aPacket
    *        The message received from the server.
@@ -4891,17 +4853,16 @@ WebConsoleConnectionProxy.prototype = {
     this._disconnecter = Promise.defer();
 
     if (!this.client) {
       this._disconnecter.resolve(null);
       return this._disconnecter.promise;
     }
 
     this.client.removeListener("pageError", this._onPageError);
-    this.client.removeListener("logMessage", this._onLogMessage);
     this.client.removeListener("consoleAPICall", this._onConsoleAPICall);
     this.client.removeListener("networkEvent", this._onNetworkEvent);
     this.client.removeListener("networkEventUpdate", this._onNetworkEventUpdate);
     this.client.removeListener("fileActivity", this._onFileActivity);
     this.target.off("will-navigate", this._onTabNavigated);
     this.target.off("navigate", this._onTabNavigated);
 
     this.client = null;
--- a/js/xpconnect/idl/nsIScriptError.idl
+++ b/js/xpconnect/idl/nsIScriptError.idl
@@ -6,17 +6,17 @@
 /*
  * nsIConsoleMessage subclass for representing JavaScript errors and warnings.
  */
 
 
 #include "nsISupports.idl"
 #include "nsIConsoleMessage.idl"
 
-[scriptable, uuid(cac9d8e8-0d53-4fa8-9903-bb367e4fa1fe)]
+[scriptable, uuid(ec640482-be5f-49a0-a9cb-c87eacce9291)]
 interface nsIScriptError : nsIConsoleMessage
 {
     /** pseudo-flag for default case */
     const unsigned long errorFlag = 0x0;
 
     /** message is warning */
     const unsigned long warningFlag = 0x1;
 
@@ -36,16 +36,43 @@ interface nsIScriptError : nsIConsoleMes
     readonly attribute AString errorMessage;
 
     readonly attribute AString sourceName;
     readonly attribute AString sourceLine;
     readonly attribute uint32_t lineNumber;
     readonly attribute uint32_t columnNumber;
     readonly attribute uint32_t flags;
 
+    /**
+     * Categories I know about -
+     * XUL javascript
+     * content javascript (both of these from nsDocShell, currently)
+     * component javascript (errors in JS components)
+     */
+    readonly attribute string category;
+
+    /*
+       The time (in milliseconds from the Epoch) that the script error instance
+       was initialised, and thus the time when the error occurred.
+       Currently used to display date and time of the message in Error console.
+       The timestamp is initialized as JS_now/1000 so that it can be
+       compared to Date.now in Javascript.
+     */
+    readonly attribute long long timeStamp;
+
+    /* Get the window id this was initialized with.  Zero will be
+       returned if init() was used instead of initWithWindowID(). */
+    readonly attribute unsigned long long outerWindowID;
+
+    /* Get the inner window id this was initialized with.  Zero will be
+       returned if init() was used instead of initWithWindowID(). */
+    readonly attribute unsigned long long innerWindowID;
+
+    readonly attribute boolean isFromPrivateWindow;
+
     void init(in AString message,
               in AString sourceName,
               in AString sourceLine,
               in uint32_t lineNumber,
               in uint32_t columnNumber,
               in uint32_t flags,
               in string category);
 
@@ -55,16 +82,18 @@ interface nsIScriptError : nsIConsoleMes
     void initWithWindowID(in AString message,
                           in AString sourceName,
                           in AString sourceLine,
                           in uint32_t lineNumber,
                           in uint32_t columnNumber,
                           in uint32_t flags,
                           in string category,
                           in unsigned long long innerWindowID);
+
+    AUTF8String toString();
 };
 
 %{ C++
 #define NS_SCRIPTERROR_CID \
-{ 0x1950539a, 0x90f0, 0x4d22, { 0xb5, 0xaf, 0x71, 0x32, 0x9c, 0x68, 0xfa, 0x35 }}
+{ 0xe38e53b9, 0x5bb0, 0x456a, { 0xb5, 0x53, 0x57, 0x93, 0x70, 0xcb, 0x15, 0x67 }}
 
 #define NS_SCRIPTERROR_CONTRACTID "@mozilla.org/scripterror;1"
 %}
--- a/js/xpconnect/src/nsScriptError.cpp
+++ b/js/xpconnect/src/nsScriptError.cpp
@@ -88,26 +88,16 @@ nsScriptError::GetFlags(uint32_t *result
 }
 
 NS_IMETHODIMP
 nsScriptError::GetCategory(char **result) {
     *result = ToNewCString(mCategory);
     return NS_OK;
 }
 
-// nsIConsoleMessage method
-NS_IMETHODIMP
-nsScriptError::InitMessage(const nsAString& message,
-                           const char *category,
-                           uint64_t innerWindowID)
-{
-    return InitWithWindowID(message, EmptyString(), EmptyString(), 0, 0, 0,
-                            category, innerWindowID);
-}
-
 NS_IMETHODIMP
 nsScriptError::Init(const nsAString& message,
                     const nsAString& sourceName,
                     const nsAString& sourceLine,
                     uint32_t lineNumber,
                     uint32_t columnNumber,
                     uint32_t flags,
                     const char *category)
--- a/toolkit/devtools/debugger/dbg-client.jsm
+++ b/toolkit/devtools/debugger/dbg-client.jsm
@@ -169,17 +169,16 @@ const ThreadStateTypes = {
 /**
  * Set of protocol messages that are sent by the server without a prior request
  * by the client.
  */
 const UnsolicitedNotifications = {
   "consoleAPICall": "consoleAPICall",
   "eventNotification": "eventNotification",
   "fileActivity": "fileActivity",
-  "logMessage": "logMessage",
   "networkEvent": "networkEvent",
   "networkEventUpdate": "networkEventUpdate",
   "newGlobal": "newGlobal",
   "newScript": "newScript",
   "newSource": "newSource",
   "tabDetached": "tabDetached",
   "tabNavigated": "tabNavigated",
   "pageError": "pageError",
--- a/toolkit/devtools/webconsole/WebConsoleUtils.jsm
+++ b/toolkit/devtools/webconsole/WebConsoleUtils.jsm
@@ -34,17 +34,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource:///modules/devtools/gDevTools.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "devtools",
                                   "resource://gre/modules/devtools/Loader.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "VariablesView",
                                   "resource:///modules/devtools/VariablesView.jsm");
 
 this.EXPORTED_SYMBOLS = ["WebConsoleUtils", "JSPropertyProvider", "JSTermHelpers",
-                         "ConsoleServiceListener", "ConsoleAPIListener",
+                         "PageErrorListener", "ConsoleAPIListener",
                          "NetworkResponseListener", "NetworkMonitor",
                          "ConsoleProgressListener"];
 
 // Match the function name from the result of toString() or toSource().
 //
 // Examples:
 // (function foobar(a, b) { ...
 // function foobar2(a) { ...
@@ -868,104 +868,101 @@ function getMatchedProps(aObj, aOptions 
 return JSPropertyProvider;
 })(WebConsoleUtils);
 
 ///////////////////////////////////////////////////////////////////////////////
 // The page errors listener
 ///////////////////////////////////////////////////////////////////////////////
 
 /**
- * The nsIConsoleService listener. This is used to send all of the console
- * messages (JavaScript, CSS and more) to the remote Web Console instance.
+ * The nsIConsoleService listener. This is used to send all the page errors
+ * (JavaScript, CSS and more) to the remote Web Console instance.
  *
  * @constructor
  * @param nsIDOMWindow [aWindow]
  *        Optional - the window object for which we are created. This is used
  *        for filtering out messages that belong to other windows.
  * @param object aListener
- *        The listener object must have one method:
- *        - onConsoleServiceMessage(). This method is invoked with one argument, the
- *        nsIConsoleMessage, whenever a relevant message is received.
+ *        The listener object must have a method: onPageError. This method is
+ *        invoked with one argument, the nsIScriptError, whenever a relevant
+ *        page error is received.
  */
-this.ConsoleServiceListener = function ConsoleServiceListener(aWindow, aListener)
+this.PageErrorListener = function PageErrorListener(aWindow, aListener)
 {
   this.window = aWindow;
   this.listener = aListener;
 }
 
-ConsoleServiceListener.prototype =
+PageErrorListener.prototype =
 {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIConsoleListener]),
 
   /**
    * The content window for which we listen to page errors.
    * @type nsIDOMWindow
    */
   window: null,
 
   /**
-   * The listener object which is notified of messages from the console service.
+   * The listener object which is notified of page errors. It must have
+   * a onPageError method which is invoked with one argument: the nsIScriptError.
    * @type object
    */
   listener: null,
 
   /**
    * Initialize the nsIConsoleService listener.
    */
-  init: function CSL_init()
+  init: function PEL_init()
   {
     Services.console.registerListener(this);
   },
 
   /**
    * The nsIConsoleService observer. This method takes all the script error
    * messages belonging to the current window and sends them to the remote Web
    * Console instance.
    *
-   * @param nsIConsoleMessage aMessage
-   *        The message object coming from the nsIConsoleService.
+   * @param nsIScriptError aScriptError
+   *        The script error object coming from the nsIConsoleService.
    */
-  observe: function CSL_observe(aMessage)
+  observe: function PEL_observe(aScriptError)
   {
-    if (!this.listener) {
+    if (!this.listener ||
+        !(aScriptError instanceof Ci.nsIScriptError)) {
       return;
     }
 
     if (this.window) {
-      if (!aMessage.outerWindowID ||
-          !this.isCategoryAllowed(aMessage.category)) {
+      if (!aScriptError.outerWindowID ||
+          !this.isCategoryAllowed(aScriptError.category)) {
         return;
       }
 
-      let errorWindow = Services.wm.getOuterWindowWithId(aMessage.outerWindowID);
+      let errorWindow =
+        Services.wm.getOuterWindowWithId(aScriptError.outerWindowID);
       if (!errorWindow || errorWindow.top != this.window) {
         return;
       }
     }
 
-    if (aMessage.message) {
-      this.listener.onConsoleServiceMessage(aMessage);
-    }
+    this.listener.onPageError(aScriptError);
   },
 
   /**
-   * Check if the given message category is allowed to be tracked or not.
+   * Check if the given script error category is allowed to be tracked or not.
    * We ignore chrome-originating errors as we only care about content.
    *
    * @param string aCategory
-   *        The message category you want to check.
+   *        The nsIScriptError category you want to check.
    * @return boolean
    *         True if the category is allowed to be logged, false otherwise.
    */
-  isCategoryAllowed: function CSL_isCategoryAllowed(aCategory)
+  isCategoryAllowed: function PEL_isCategoryAllowed(aCategory)
   {
-    if (!aCategory) {
-      return false;
-    }
-
     switch (aCategory) {
       case "XPConnect JavaScript":
       case "component javascript":
       case "chrome javascript":
       case "chrome registration":
       case "XBL":
       case "XBL Prototype Handler":
       case "XBL Content Sink":
@@ -975,36 +972,38 @@ ConsoleServiceListener.prototype =
 
     return true;
   },
 
   /**
    * Get the cached page errors for the current inner window.
    *
    * @return array
-   *         The array of cached messages. Each element is an nsIScriptError or
-   *         an nsIConsoleMessage.
+   *         The array of cached messages. Each element is an nsIScriptError
+   *         with an added _type property so the remote Web Console instance can
+   *         tell the difference between various types of cached messages.
    */
-  getCachedMessages: function CSL_getCachedMessages()
+  getCachedMessages: function PEL_getCachedMessages()
   {
     let innerWindowId = this.window ?
                         WebConsoleUtils.getInnerWindowId(this.window) : null;
     let errors = Services.console.getMessageArray() || [];
 
-    return errors.filter((aError) => {
-      return !innerWindowId ||
+    return errors.filter(function(aError) {
+      return aError instanceof Ci.nsIScriptError &&
+             (!innerWindowId ||
               (aError.innerWindowID == innerWindowId &&
-               this.isCategoryAllowed(aError.category));
-    });
+               this.isCategoryAllowed(aError.category)));
+    }, this);
   },
 
   /**
    * Remove the nsIConsoleService listener.
    */
-  destroy: function CSL_destroy()
+  destroy: function PEL_destroy()
   {
     Services.console.unregisterListener(this);
     this.listener = this.window = null;
   },
 };
 
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1087,17 +1086,18 @@ ConsoleAPIListener.prototype =
 
     this.owner.onConsoleAPICall(apiMessage);
   },
 
   /**
    * Get the cached messages for the current inner window.
    *
    * @return array
-   *         The array of cached messages.
+   *         The array of cached messages. Each element is a Console API
+   *         prepared to be sent to the remote Web Console instance.
    */
   getCachedMessages: function CAL_getCachedMessages()
   {
     let innerWindowId = this.window ?
                         WebConsoleUtils.getInnerWindowId(this.window) : null;
     return ConsoleAPIStorage.getEvents(innerWindowId);
   },
 
--- a/toolkit/devtools/webconsole/dbg-webconsole-actors.js
+++ b/toolkit/devtools/webconsole/dbg-webconsole-actors.js
@@ -13,17 +13,17 @@ let Cu = Components.utils;
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
                                   "resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "WebConsoleUtils",
                                   "resource://gre/modules/devtools/WebConsoleUtils.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "ConsoleServiceListener",
+XPCOMUtils.defineLazyModuleGetter(this, "PageErrorListener",
                                   "resource://gre/modules/devtools/WebConsoleUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPIListener",
                                   "resource://gre/modules/devtools/WebConsoleUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ConsoleProgressListener",
                                   "resource://gre/modules/devtools/WebConsoleUtils.jsm");
 
@@ -160,20 +160,20 @@ WebConsoleActor.prototype =
    * The content window we work with.
    * @type nsIDOMWindow
    */
   get window() this._window,
 
   _window: null,
 
   /**
-   * The ConsoleServiceListener instance.
+   * The PageErrorListener instance.
    * @type object
    */
-  consoleServiceListener: null,
+  pageErrorListener: null,
 
   /**
    * The ConsoleAPIListener instance.
    */
   consoleAPIListener: null,
 
   /**
    * The NetworkMonitor instance.
@@ -206,19 +206,19 @@ WebConsoleActor.prototype =
   _findProtoChain: ThreadActor.prototype._findProtoChain,
   _removeFromProtoChain: ThreadActor.prototype._removeFromProtoChain,
 
   /**
    * Destroy the current WebConsoleActor instance.
    */
   disconnect: function WCA_disconnect()
   {
-    if (this.consoleServiceListener) {
-      this.consoleServiceListener.destroy();
-      this.consoleServiceListener = null;
+    if (this.pageErrorListener) {
+      this.pageErrorListener.destroy();
+      this.pageErrorListener = null;
     }
     if (this.consoleAPIListener) {
       this.consoleAPIListener.destroy();
       this.consoleAPIListener = null;
     }
     if (this.networkMonitor) {
       this.networkMonitor.destroy();
       this.networkMonitor = null;
@@ -358,20 +358,20 @@ WebConsoleActor.prototype =
   {
     let startedListeners = [];
     let window = !this._isGlobalActor ? this.window : null;
 
     while (aRequest.listeners.length > 0) {
       let listener = aRequest.listeners.shift();
       switch (listener) {
         case "PageError":
-          if (!this.consoleServiceListener) {
-            this.consoleServiceListener =
-              new ConsoleServiceListener(window, this);
-            this.consoleServiceListener.init();
+          if (!this.pageErrorListener) {
+            this.pageErrorListener =
+              new PageErrorListener(window, this);
+            this.pageErrorListener.init();
           }
           startedListeners.push(listener);
           break;
         case "ConsoleAPI":
           if (!this.consoleAPIListener) {
             this.consoleAPIListener =
               new ConsoleAPIListener(window, this);
             this.consoleAPIListener.init();
@@ -421,19 +421,19 @@ WebConsoleActor.prototype =
     let toDetach = aRequest.listeners ||
                    ["PageError", "ConsoleAPI", "NetworkActivity",
                     "FileActivity"];
 
     while (toDetach.length > 0) {
       let listener = toDetach.shift();
       switch (listener) {
         case "PageError":
-          if (this.consoleServiceListener) {
-            this.consoleServiceListener.destroy();
-            this.consoleServiceListener = null;
+          if (this.pageErrorListener) {
+            this.pageErrorListener.destroy();
+            this.pageErrorListener = null;
           }
           stoppedListeners.push(listener);
           break;
         case "ConsoleAPI":
           if (this.consoleAPIListener) {
             this.consoleAPIListener.destroy();
             this.consoleAPIListener = null;
           }
@@ -490,34 +490,23 @@ WebConsoleActor.prototype =
             cache.forEach(function(aMessage) {
               let message = this.prepareConsoleMessageForRemote(aMessage);
               message._type = type;
               messages.push(message);
             }, this);
           }
           break;
         case "PageError":
-          if (this.consoleServiceListener) {
-            let cache = this.consoleServiceListener.getCachedMessages();
-            cache.forEach((aMessage) => {
-              let message = null;
-              if (aMessage instanceof Ci.nsIScriptError) {
-                message = this.preparePageErrorForRemote(aMessage);
-                message._type = type;
-              }
-              else {
-                message = {
-                  _type: "LogMessage",
-                  message: aMessage.message,
-                  timeStamp: aMessage.timeStamp,
-                  category: aMessage.category,
-                };
-              }
+          if (this.pageErrorListener) {
+            let cache = this.pageErrorListener.getCachedMessages();
+            cache.forEach(function(aMessage) {
+              let message = this.preparePageErrorForRemote(aMessage);
+              message._type = type;
               messages.push(message);
-            });
+            }, this);
           }
           break;
       }
     }
 
     messages.sort(function(a, b) { return a.timeStamp - b.timeStamp; });
 
     return {
@@ -601,20 +590,16 @@ WebConsoleActor.prototype =
    * The "clearMessagesCache" request handler.
    */
   onClearMessagesCache: function WCA_onClearMessagesCache()
   {
     // TODO: Bug 717611 - Web Console clear button does not clear cached errors
     let windowId = !this._isGlobalActor ?
                    WebConsoleUtils.getInnerWindowId(this.window) : null;
     ConsoleAPIStorage.clearEvents(windowId);
-    if (this._isGlobalActor) {
-      Services.console.logStringMessage(null); // for the Error Console
-      Services.console.reset();
-    }
     return {};
   },
 
   /**
    * The "setPreferences" request handler.
    *
    * @param object aRequest
    *        The request message - which preferences need to be updated.
@@ -862,41 +847,29 @@ WebConsoleActor.prototype =
     };
   },
 
   //////////////////
   // Event handlers for various listeners.
   //////////////////
 
   /**
-   * Handler for messages received from the ConsoleServiceListener. This method
-   * sends the nsIConsoleMessage to the remote Web Console client.
+   * Handler for page errors received from the PageErrorListener. This method
+   * sends the nsIScriptError to the remote Web Console client.
    *
-   * @param nsIConsoleMessage aMessage
-   *        The message we need to send to the client.
+   * @param nsIScriptError aPageError
+   *        The page error we need to send to the client.
    */
-  onConsoleServiceMessage: function WCA_onConsoleServiceMessage(aMessage)
+  onPageError: function WCA_onPageError(aPageError)
   {
-    let packet;
-    if (aMessage instanceof Ci.nsIScriptError) {
-      packet = {
-        from: this.actorID,
-        type: "pageError",
-        pageError: this.preparePageErrorForRemote(aMessage),
-      };
-    }
-    else {
-      packet = {
-        from: this.actorID,
-        type: "logMessage",
-        message: aMessage.message,
-        timeStamp: aMessage.timeStamp,
-        category: aMessage.category,
-      };
-    }
+    let packet = {
+      from: this.actorID,
+      type: "pageError",
+      pageError: this.preparePageErrorForRemote(aPageError),
+    };
     this.conn.send(packet);
   },
 
   /**
    * Prepare an nsIScriptError to be sent to the client.
    *
    * @param nsIScriptError aPageError
    *        The page error we need to send to the client.
--- a/toolkit/devtools/webconsole/test/Makefile.in
+++ b/toolkit/devtools/webconsole/test/Makefile.in
@@ -19,16 +19,15 @@ MOCHITEST_CHROME_FILES = \
     test_object_actor.html \
     test_network_get.html \
     test_network_post.html \
     test_network_longstring.html \
     test_file_uri.html \
     test_bug819670_getter_throws.html \
     test_object_actor_native_getters.html \
     test_object_actor_native_getters_lenient_this.html \
-    test_nsiconsolemessage.html \
     network_requests_iframe.html \
     data.json \
     data.json^headers^ \
     common.js \
     $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/devtools/webconsole/test/common.js
+++ b/toolkit/devtools/webconsole/test/common.js
@@ -101,20 +101,17 @@ function checkObject(aObject, aExpected)
     let expected = aExpected[name];
     let value = aObject[name];
     checkValue(name, value, expected);
   }
 }
 
 function checkValue(aName, aValue, aExpected)
 {
-  if (aExpected === null) {
-    ok(!aValue, "'" + aName + "' is null");
-  }
-  else if (aValue === undefined) {
+  if (aValue === undefined) {
     ok(false, "'" + aName + "' is undefined");
   }
   else if (typeof aExpected == "string" || typeof aExpected == "number" ||
            typeof aExpected == "boolean") {
     is(aValue, aExpected, "property '" + aName + "'");
   }
   else if (aExpected instanceof RegExp) {
     ok(aExpected.test(aValue), aName + ": " + aExpected + " matched " + aValue);
--- a/toolkit/devtools/webconsole/test/test_cached_messages.html
+++ b/toolkit/devtools/webconsole/test/test_cached_messages.html
@@ -90,30 +90,30 @@ function doConsoleCalls()
     },
   ];
 }
 </script>
 
 <script class="testbody" type="text/javascript;version=1.8">
 SimpleTest.waitForExplicitFinish();
 
-let consoleAPIListener, consoleServiceListener;
+let consoleAPIListener, pageErrorListener;
 let consoleAPICalls = 0;
 let pageErrors = 0;
 
 let handlers = {
   onConsoleAPICall: function onConsoleAPICall()
   {
     consoleAPICalls++;
     if (consoleAPICalls == expectedConsoleCalls.length) {
       checkConsoleAPICache();
     }
   },
 
-  onConsoleServiceMessage: function onConsoleServiceMessage()
+  onPageError: function onPageError()
   {
     pageErrors++;
     if (pageErrors == expectedPageErrors.length) {
       testPageErrors();
     }
   },
 };
 
@@ -148,26 +148,26 @@ function onCachedConsoleAPI(aState, aRes
      "number of cached console messages");
 
   expectedConsoleCalls.forEach(function(aMessage, aIndex) {
     info("checking received cached message #" + aIndex);
     checkConsoleAPICall(msgs[aIndex], expectedConsoleCalls[aIndex]);
   });
 
   closeDebugger(aState, function() {
-    consoleServiceListener = new ConsoleServiceListener(null, handlers);
-    consoleServiceListener.init();
+    pageErrorListener = new PageErrorListener(null, handlers);
+    pageErrorListener.init();
     doPageErrors();
   });
 }
 
 function testPageErrors()
 {
-  consoleServiceListener.destroy();
-  consoleServiceListener = null;
+  pageErrorListener.destroy();
+  pageErrorListener = null;
   attachConsole(["PageError"], onAttach2);
 }
 
 function onAttach2(aState, aResponse)
 {
   aState.client.getCachedMessages(["PageError"],
                                   onCachedPageErrors.bind(null, aState));
 }
deleted file mode 100644
--- a/toolkit/devtools/webconsole/test/test_nsiconsolemessage.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-  <meta charset="utf8">
-  <title>Test for nsIConsoleMessages</title>
-  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript;version=1.8" src="common.js"></script>
-  <!-- Any copyright is dedicated to the Public Domain.
-     - http://creativecommons.org/publicdomain/zero/1.0/ -->
-</head>
-<body>
-<p>Make sure that nsIConsoleMessages are logged. See bug 859756.</p>
-
-<script class="testbody" type="text/javascript;version=1.8">
-SimpleTest.waitForExplicitFinish();
-
-let expectedMessages = [];
-let testingTabActor = false;
-
-function sendConsoleMessage(aMessage, aCategory, aWindowId)
-{
-  let consoleMsg = Cc["@mozilla.org/consolemessage;1"]
-                   .createInstance(Ci.nsIConsoleMessage);
-  consoleMsg.initMessage(aMessage, aCategory, aWindowId);
-  Services.console.logMessage(consoleMsg);
-}
-
-function sendMessages()
-{
-  expectedMessages = [
-    {
-      message: "hello world! bug859756",
-      category: null,
-      timeStamp: /^\d+$/,
-    },
-    {
-      message: "foobarz",
-      category: null,
-      timeStamp: /^\d+$/,
-    },
-    {
-      message: "boom",
-      category: "cat7",
-      timeStamp: /^\d+$/,
-    },
-    {
-      message: "windowfun",
-      category: "cat9",
-      timeStamp: /^\d+$/,
-    },
-  ];
-
-  Services.console.logStringMessage("hello world! bug859756");
-  sendConsoleMessage("foobarz");
-  sendConsoleMessage("boom", "cat7");
-  sendConsoleMessage("windowfun", "cat9", Date.now());
-}
-
-function sendMessagesForTab()
-{
-  sendMessages();
-  expectedMessages = [
-    {
-      message: "windowfun3",
-      category: "cat10",
-      timeStamp: /^\d+$/,
-    },
-  ];
-
-  let windowID = WebConsoleUtils.getInnerWindowId(top);
-  sendConsoleMessage("windowfun3", "cat10", windowID);
-}
-
-function startTest()
-{
-  removeEventListener("load", startTest);
-  attachConsole(["PageError"], onAttach);
-}
-
-function onAttach(aState, aResponse)
-{
-  window.onLogMessage_ = onLogMessage.bind(null, aState);
-  aState.dbgClient.addListener("logMessage", onLogMessage_);
-
-  if (!testingTabActor) {
-    sendMessages();
-  } else {
-    sendMessagesForTab();
-  }
-
-  info("waiting for messages");
-}
-
-let receivedMessages = [];
-
-function onLogMessage(aState, aType, aPacket)
-{
-  is(aPacket.from, aState.actor, "packet actor");
-
-  receivedMessages.push(aPacket);
-  if (receivedMessages.length != expectedMessages.length) {
-    return;
-  }
-
-  aState.dbgClient.removeListener("logMessage", onLogMessage_);
-
-  checkObject(receivedMessages, expectedMessages);
-
-  receivedMessages = expectedMessages = [];
-  window.onLogMessage_ = null;
-
-  closeDebugger(aState, () => {
-    if (!testingTabActor) {
-      testingTabActor = true;
-      info("start tab actor test");
-      attachConsole(["PageError"], onAttach, true);
-    } else {
-      SimpleTest.finish();
-    }
-  });
-}
-
-addEventListener("load", startTest);
-</script>
-</body>
-</html>
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -98,17 +98,16 @@ DEFINES		+= -D_IMPL_NS_COM
 
 ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
 CXXFLAGS        += $(MOZ_GTK2_CFLAGS)
 endif
 
 LOCAL_INCLUDES += \
 		-I$(srcdir)/../build \
 		-I$(topsrcdir)/xpcom/ds \
-		-I$(topsrcdir)/dom/base \
 		$(NULL)
 
 # We generate ErrorListCxxDefines.h from ErrorList.h using regex.  The -n option
 # suppresses printing the pattern space, and the p at the end prints it anyway,
 # so we don't print lines that don't match the pattern to start with.
 ErrorListCxxDefines.h: ErrorList.h Makefile
 		sed -n 's/.*ERROR(\([A-Z_0-9]*\).*/#define \1 nsresult::\1/p' < $< > $@
 
--- a/xpcom/base/nsConsoleMessage.cpp
+++ b/xpcom/base/nsConsoleMessage.cpp
@@ -4,120 +4,34 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Base implementation for console messages.
  */
 
 #include "nsConsoleMessage.h"
 #include "nsReadableUtils.h"
-#include "jsapi.h"
-#include "nsGlobalWindow.h"
-#include "nsPIDOMWindow.h"
-#include "nsILoadContext.h"
-#include "nsIDocShell.h"
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsConsoleMessage, nsIConsoleMessage)
 
-nsConsoleMessage::nsConsoleMessage()
-    :  mMessage(),
-       mCategory(),
-       mOuterWindowID(0),
-       mInnerWindowID(0),
-       mTimeStamp(0),
-       mIsFromPrivateWindow(false)
+nsConsoleMessage::nsConsoleMessage() 
 {
 }
 
-nsConsoleMessage::nsConsoleMessage(const PRUnichar *message)
+nsConsoleMessage::nsConsoleMessage(const PRUnichar *message) 
 {
-  nsString m;
-  m.Assign(message);
-  InitMessage(m, nullptr, 0);
+	mMessage.Assign(message);
 }
 
 NS_IMETHODIMP
-nsConsoleMessage::InitMessage(const nsAString& message,
-                              const char *category,
-                              uint64_t innerWindowID)
-{
-  mTimeStamp = JS_Now() / 1000;
-  mMessage.Assign(message);
-  mCategory.Assign(category);
-  mInnerWindowID = innerWindowID;
-
-  if (innerWindowID) {
-    nsGlobalWindow* window = nsGlobalWindow::GetInnerWindowWithId(innerWindowID);
-    if (window) {
-      nsPIDOMWindow* outer = window->GetOuterWindow();
-      if (outer)
-        mOuterWindowID = outer->WindowID();
-
-      nsIDocShell* docShell = window->GetDocShell();
-      nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
+nsConsoleMessage::GetMessageMoz(PRUnichar **result) {
+    *result = ToNewUnicode(mMessage);
 
-      if (loadContext) {
-        // Never mark exceptions from chrome windows as having come from
-        // private windows, since we always want them to be reported.
-        nsIPrincipal* winPrincipal = window->GetPrincipal();
-        mIsFromPrivateWindow = loadContext->UsePrivateBrowsing() &&
-                               !nsContentUtils::IsSystemPrincipal(winPrincipal);
-      }
-    }
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsConsoleMessage::GetMessageMoz(PRUnichar **result)
-{
-  *result = ToNewUnicode(mMessage);
-
-  return NS_OK;
+    return NS_OK;
 }
 
-NS_IMETHODIMP
-nsConsoleMessage::GetCategory(char **result)
-{
-  *result = ToNewCString(mCategory);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsConsoleMessage::GetOuterWindowID(uint64_t *aOuterWindowID)
-{
-  *aOuterWindowID = mOuterWindowID;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsConsoleMessage::GetInnerWindowID(uint64_t *aInnerWindowID)
-{
-  *aInnerWindowID = mInnerWindowID;
-  return NS_OK;
-}
+//  NS_IMETHODIMP
+//  nsConsoleMessage::Init(const PRUnichar *message) {
+//      nsAutoString newMessage(message);
+//      mMessage = ToNewUnicode(newMessage);
+//      return NS_OK;
+//  }
 
-NS_IMETHODIMP
-nsConsoleMessage::GetTimeStamp(int64_t *aTimeStamp)
-{
-  *aTimeStamp = mTimeStamp;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsConsoleMessage::GetIsFromPrivateWindow(bool *aIsFromPrivateWindow)
-{
-  *aIsFromPrivateWindow = mIsFromPrivateWindow;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsConsoleMessage::ToString(nsACString& /*UTF8*/ aResult)
-{
-  if (!mCategory.IsEmpty())
-    aResult.Assign(mCategory + NS_LITERAL_CSTRING(": ") +
-                   NS_ConvertUTF16toUTF8(mMessage));
-  else
-    CopyUTF16toUTF8(mMessage, aResult);
-
-  return NS_OK;
-}
--- a/xpcom/base/nsConsoleMessage.h
+++ b/xpcom/base/nsConsoleMessage.h
@@ -17,17 +17,12 @@ public:
     nsConsoleMessage(const PRUnichar *message);
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSICONSOLEMESSAGE
 
 private:
     ~nsConsoleMessage() {}
 
-    int64_t mTimeStamp;
-    nsCString mCategory;
-    uint64_t mOuterWindowID;
-    uint64_t mInnerWindowID;
-    bool mIsFromPrivateWindow;
     nsString mMessage;
 };
 
 #endif /* __nsconsolemessage_h__ */
--- a/xpcom/base/nsIConsoleMessage.idl
+++ b/xpcom/base/nsIConsoleMessage.idl
@@ -5,54 +5,18 @@
 
 #include "nsISupports.idl"
 
 /**
  * This is intended as a base interface; implementations may want to
  * provide an object that can be qi'ed to provide more specific
  * message information.
  */
-[scriptable, uuid(c14c151b-5ea4-47ed-8e85-d392cdd3e154)]
+[scriptable, uuid(41bd8784-1dd2-11b2-9553-8606958fffe1)]
 interface nsIConsoleMessage : nsISupports
 {
-    void initMessage(in AString message, [optional] in string category, [optional] in unsigned long long innerWindowID);
-
-    /**
-     * The time (in milliseconds from the Epoch) that the message instance
-     * was initialised.
-     * The timestamp is initialized as JS_now/1000 so that it can be
-     * compared to Date.now in Javascript.
-     */
-    readonly attribute long long timeStamp;
-
-    /**
-     * Categories I know about
-     * - nsIScriptError:
-     *   XUL javascript
-     *   content javascript (both of these from nsDocShell, currently)
-     *   component javascript (errors in JS components)
-     * - nsIConsoleMessage: none yet.
-     */
-    readonly attribute string category;
-
-    /**
-     * Get the window id this was initialized with.
-     */
-    readonly attribute unsigned long long outerWindowID;
-
-    /**
-     * Get the inner window id this was initialized with.
-     */
-    readonly attribute unsigned long long innerWindowID;
-
-    readonly attribute boolean isFromPrivateWindow;
-
     [binaryname(MessageMoz)] readonly attribute wstring message;
-
-    AUTF8String toString();
 };
 
 %{ C++
 #define NS_CONSOLEMESSAGE_CID \
-{ 0x024efc9e, 0x54dc, 0x4844, { 0x80, 0x4b, 0x41, 0xd3, 0xf3, 0x69, 0x90, 0x73 }}
-
-#define NS_CONSOLEMESSAGE_CONTRACTID "@mozilla.org/consolemessage;1"
+{ 0x56c9d666, 0x1dd2, 0x11b2, { 0xb4, 0x3c, 0xa8, 0x4b, 0xf3, 0xb3, 0xec, 0xbb }}
 %}
--- a/xpcom/build/XPCOMModule.inc
+++ b/xpcom/build/XPCOMModule.inc
@@ -16,17 +16,16 @@
     COMPONENT(PROPERTIES, nsPropertiesConstructor)
 
     COMPONENT(PERSISTENTPROPERTIES, nsPersistentProperties::Create)
 
     COMPONENT(SUPPORTSARRAY, nsSupportsArray::Create)
     COMPONENT(ARRAY, nsArray::XPCOMConstructor)
     COMPONENT(CONSOLESERVICE, nsConsoleServiceConstructor)
     COMPONENT(EXCEPTIONSERVICE, nsExceptionServiceConstructor)
-    COMPONENT(CONSOLEMESSAGE, nsConsoleMessageConstructor)
     COMPONENT(ATOMSERVICE, nsAtomServiceConstructor)
     COMPONENT(OBSERVERSERVICE, nsObserverService::Create)
 #ifdef MOZ_VISUAL_EVENT_TRACER
     COMPONENT(VISUALEVENTTRACER, VisualEventTracerConstructor)
 #endif
 
     COMPONENT(TIMER, nsTimerImplConstructor)
 
--- a/xpcom/build/nsXPComInit.cpp
+++ b/xpcom/build/nsXPComInit.cpp
@@ -34,17 +34,16 @@
 #include "nsByteBuffer.h"
 
 #include "nsSupportsArray.h"
 #include "nsArray.h"
 #include "nsINIParserImpl.h"
 #include "nsSupportsPrimitives.h"
 #include "nsConsoleService.h"
 #include "nsExceptionService.h"
-#include "nsConsoleMessage.h"
 
 #include "nsComponentManager.h"
 #include "nsCategoryManagerUtils.h"
 #include "nsIServiceManager.h"
 
 #include "nsThreadManager.h"
 #include "nsThreadPool.h"
 
@@ -174,17 +173,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupport
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsPRInt32Impl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsPRInt64Impl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsFloatImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsDoubleImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsVoidImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsInterfacePointerImpl)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsConsoleService, Init)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsConsoleMessage)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAtomService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsExceptionService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryOutputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryInputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsStorageStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsVersionComparatorImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableBase64Encoder)