Backed out changeset 12002e126b39 (bug 769298)
authorJosh Matthews <josh@joshmatthews.net>
Thu, 18 Oct 2012 17:27:23 -0400
changeset 110839 d439018c05237f092cedf6f271aedb3907670398
parent 110838 53a930cc32b53c35a7ce67ecc5b8769cb9558273
child 110840 fd55560883885f34693dde74aa62c0fad2ec0835
child 110845 a5dbfe84e1783b3208a86f45235ff49a6e50b915
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs769298
milestone19.0a1
backs out12002e126b397695d7d4c840958d52849f904429
Backed out changeset 12002e126b39 (bug 769298)
js/xpconnect/idl/nsIScriptError.idl
js/xpconnect/src/nsScriptError.cpp
js/xpconnect/src/xpcprivate.h
toolkit/components/console/content/consoleBindings.xml
toolkit/components/console/jar.mn
--- 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(ec640482-be5f-49a0-a9cb-c87eacce9291)]
+[scriptable, uuid(ddc19b34-e22e-46d5-9f7f-c7768a7dc50a)]
 interface nsIScriptError : nsIConsoleMessage
 {
     /** pseudo-flag for default case */
     const unsigned long errorFlag = 0x0;
 
     /** message is warning */
     const unsigned long warningFlag = 0x1;
 
@@ -61,18 +61,16 @@ interface nsIScriptError : nsIConsoleMes
     /* 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);
 
--- a/js/xpconnect/src/nsScriptError.cpp
+++ b/js/xpconnect/src/nsScriptError.cpp
@@ -6,33 +6,30 @@
 /*
  * nsIScriptError implementation.  Defined here, lacking a JS-specific
  * place to put XPCOM things.
  */
 
 #include "xpcprivate.h"
 #include "nsGlobalWindow.h"
 #include "nsPIDOMWindow.h"
-#include "nsILoadContext.h"
-#include "nsIDocShell.h"
 
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsScriptError, nsIConsoleMessage, nsIScriptError)
 
 nsScriptError::nsScriptError()
     :  mMessage(),
        mSourceName(),
        mLineNumber(0),
        mSourceLine(),
        mColumnNumber(0),
        mFlags(0),
        mCategory(),
        mOuterWindowID(0),
        mInnerWindowID(0),
-       mTimeStamp(0),
-       mIsFromPrivateWindow(false)
+       mTimeStamp(0)
 {
 }
 
 nsScriptError::~nsScriptError() {}
 
 // nsIConsoleMessage methods
 NS_IMETHODIMP
 nsScriptError::GetMessageMoz(PRUnichar **result) {
@@ -128,20 +125,16 @@ nsScriptError::InitWithWindowID(const ns
 
     if (aInnerWindowID) {
         nsGlobalWindow* window =
           nsGlobalWindow::GetInnerWindowWithId(aInnerWindowID);
         if (window) {
             nsPIDOMWindow* outer = window->GetOuterWindow();
             if (outer)
                 mOuterWindowID = outer->WindowID();
-
-            nsIDocShell* docShell = window->GetDocShell();
-            nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
-            mIsFromPrivateWindow = loadContext->UsePrivateBrowsing();
         }
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptError::ToString(nsACString& /*UTF8*/ aResult)
@@ -219,15 +212,8 @@ nsScriptError::GetInnerWindowID(uint64_t
 }
 
 NS_IMETHODIMP
 nsScriptError::GetTimeStamp(int64_t *aTimeStamp)
 {
     *aTimeStamp = mTimeStamp;
     return NS_OK;
 }
-
-NS_IMETHODIMP
-nsScriptError::GetIsFromPrivateWindow(bool *aIsFromPrivateWindow)
-{
-    *aIsFromPrivateWindow = mIsFromPrivateWindow;
-    return NS_OK;
-}
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -3865,17 +3865,16 @@ private:
     uint32_t mLineNumber;
     nsString mSourceLine;
     uint32_t mColumnNumber;
     uint32_t mFlags;
     nsCString mCategory;
     uint64_t mOuterWindowID;
     uint64_t mInnerWindowID;
     int64_t mTimeStamp;
-    bool mIsFromPrivateWindow;
 };
 
 /******************************************************************************
  * Handles pre/post script processing and the setting/resetting the error
  * reporter
  */
 class NS_STACK_CLASS AutoScriptEvaluate
 {
--- a/toolkit/components/console/content/consoleBindings.xml
+++ b/toolkit/components/console/content/consoleBindings.xml
@@ -157,23 +157,17 @@
         <body><![CDATA[
           try {
             // Try to QI it to a script error to get more info
             var scriptError = aObject.QueryInterface(Components.interfaces.nsIScriptError);
             
             // filter chrome urls
             if (!this.showChromeErrors && scriptError.sourceName.substr(0, 9) == "chrome://")
               return;
-
-#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
-            // filter private windows
-            if (scriptError.isFromPrivateWindow)
-              return;
-#endif
-
+ 
             this.appendError(scriptError);
           } catch (ex) {
             try {
               // Try to QI it to a console message
               var msg = aObject.QueryInterface(Components.interfaces.nsIConsoleMessage);
               if (msg.message)
                 this.appendMessage(msg.message);
               else // observed a null/"clear" message
@@ -512,8 +506,9 @@
           var line = getAttribute("line");
           gViewSourceUtils.viewSource(url, null, null, line);
         ]]>
       </handler>
     </handlers>
   </binding>
 
 </bindings>
+
--- a/toolkit/components/console/jar.mn
+++ b/toolkit/components/console/jar.mn
@@ -1,9 +1,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 toolkit.jar:
    content/global/console.js                            (content/console.js)
    content/global/console.xul                           (content/console.xul)
    content/global/console.css                           (content/console.css)
-*  content/global/consoleBindings.xml                   (content/consoleBindings.xml)
+   content/global/consoleBindings.xml                   (content/consoleBindings.xml)