Backed out 4 changesets (bug 893858, bug 868859, bug 886903) for Linux debug mochitest-other crashes on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 17 Jul 2013 12:43:59 -0400
changeset 139654 998c273658b8dd45657a4c0a142ef61299396d2f
parent 139653 a984893f3f2ac7c116fa7c8968b8d1e589d62c05
child 139655 d37d6d268de60a737d084d5f8cd7aad2aa24a901
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-esr52@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs893858, 868859, 886903
milestone25.0a1
backs out0ded4854067b24c0c2019781eb41bbc6981f0ba6
ca8afb897e13c21d3823795eddfbd9e5bd35de2c
c15f503a96ccb721133a34a0692c33da72fc60af
6a788f399a7f338562fdb45d4b95839c985c765d
Backed out 4 changesets (bug 893858, bug 868859, bug 886903) for Linux debug mochitest-other crashes on a CLOSED TREE. Backed out changeset 0ded4854067b (bug 886903) Backed out changeset ca8afb897e13 (bug 893858) Backed out changeset c15f503a96cc (bug 868859) Backed out changeset 6a788f399a7f (bug 868859)
browser/base/content/browser.js
browser/metro/base/content/browser.js
content/base/test/chrome/cpows_child.js
content/base/test/chrome/cpows_parent.xul
docshell/base/nsIDocShellTreeOwner.idl
dom/base/nsGlobalWindow.cpp
dom/interfaces/base/nsIBrowserDOMWindow.idl
dom/interfaces/base/nsIDOMJSWindow.idl
dom/interfaces/base/nsIDOMWindow.idl
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/PContent.ipdl
dom/ipc/test.xul
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
js/ipc/JavaScriptChild.cpp
js/src/jsapi.cpp
mobile/android/chrome/content/browser.js
toolkit/content/browser-child.js
toolkit/content/widgets/remote-browser.xml
toolkit/modules/RemoteWebProgress.jsm
toolkit/xre/nsAppRunner.cpp
xpfe/appshell/src/nsChromeTreeOwner.cpp
xpfe/appshell/src/nsContentTreeOwner.cpp
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4427,20 +4427,16 @@ nsBrowserAccess.prototype = {
         if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
           window.focus();
     }
     return newWindow;
   },
 
   isTabContentWindow: function (aWindow) {
     return gBrowser.browsers.some(function (browser) browser.contentWindow == aWindow);
-  },
-
-  get contentWindow() {
-    return gBrowser.contentWindow;
   }
 }
 
 function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
   var popup = aEvent.target;
   if (popup != aEvent.currentTarget)
     return;
 
--- a/browser/metro/base/content/browser.js
+++ b/browser/metro/base/content/browser.js
@@ -1200,20 +1200,16 @@ nsBrowserAccess.prototype = {
   },
 
   zoom: function browser_zoom(aAmount) {
     Browser.zoom(aAmount);
   },
 
   isTabContentWindow: function(aWindow) {
     return Browser.browsers.some(function (browser) browser.contentWindow == aWindow);
-  },
-
-  get contentWindow() {
-    return Browser.selectedBrowser.contentWindow;
   }
 };
 
 /**
  * Handler for blocked popups, triggered by DOMUpdatePageReport events in browser.xml
  */
 var PopupBlockerObserver = {
   init: function init() {
--- a/content/base/test/chrome/cpows_child.js
+++ b/content/base/test/chrome/cpows_child.js
@@ -22,25 +22,18 @@ var async_obj;
 
 function make_object()
 {
   let o = { };
   o.i = 5;
   o.b = true;
   o.s = "hello";
   o.x = { i: 10 };
-  o.f = function () { return 99; };
-
-  // Doing anything with this Proxy will throw.
-  var throwing = new Proxy({}, new Proxy({}, {
-      get: function (trap) { throw trap; }
-    }));
-
+  o.f = function () { return 99; }
   return { "data": o,
-           "throwing": throwing,
            "document": content.document
          };
 }
 
 function make_json()
 {
   return { check: "ok" };
 }
--- a/content/base/test/chrome/cpows_parent.xul
+++ b/content/base/test/chrome/cpows_parent.xul
@@ -32,49 +32,16 @@
       data.i = 6;
       data.b = false;
       data.s = "bye";
       data.x = null;
       ok(data.i === 6, "integer property");
       ok(data.b === false, "boolean property");
       ok(data.s === "bye", "string property");
       ok(data.x === null, "nested property");
-
-      let throwing = message.objects.throwing;
-      // Based on the table on:
-      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
-      let tests = [
-        () => Object.getOwnPropertyDescriptor(throwing, 'test'),
-        () => Object.getOwnPropertyNames(throwing),
-        () => Object.defineProperty(throwing, 'test', {value: 1}),
-        () => delete throwing.test,
-        () => "test" in throwing,
-        () => Object.prototype.hasOwnProperty.call(throwing, 'test'),
-        () => throwing.test,
-        () => { throwing.test = 1 },
-        // () => { for (let prop in throwing) {} }, Bug 783829
-        () => { for (let prop of throwing) {} },
-        () => Object.keys(throwing),
-        () => Function.prototype.call.call(throwing),
-        () => new throwing,
-        () => Object.preventExtensions(throwing),
-        () => Object.freeze(throwing),
-        () => Object.seal(throwing),
-      ]
-
-      for (let test of tests) {
-        let threw = false;
-        try {
-          test()
-        } catch (e) {
-          threw = true;
-        }
-        ok(threw, "proxy operation threw exception");
-      }
-
     }
 
     function recvAsyncMessage(message) {
       testCpowMessage(message);
     }
 
     function recvSyncMessage(message) {
       testCpowMessage(message);
@@ -85,17 +52,17 @@
     }
 
     function recvDoneMessage(message) {
       if (test_state == "remote") {
         test_node.parentNode.removeChild(test_node);
         run_tests("inprocess");
         return;
       }
-
+        
       finish();
     }
 
     function run_tests(type) {
       var node = document.getElementById('cpowbrowser_' + type);
 
       test_state = type;
       test_node = node;
--- a/docshell/base/nsIDocShellTreeOwner.idl
+++ b/docshell/base/nsIDocShellTreeOwner.idl
@@ -7,17 +7,17 @@
 #include "nsISupports.idl"
 
 /**
  * The nsIDocShellTreeOwner
  */
 
 interface nsIDocShellTreeItem;
 
-[scriptable, uuid(6cd89e60-1060-491e-8c31-ce969435ec56)]
+[scriptable, uuid(932f9f93-8e21-4728-a527-cafc64b4d831)]
 interface nsIDocShellTreeOwner : nsISupports
 {
 	/*
 	Return the child DocShellTreeItem with the specified name.
 	name - This is the name of the item that is trying to be found.
 	aRequestor - This is the docshellTreeItem that is requesting the find.  This
 	parameter is used to identify when the child is asking its parent to find
 	a child with the specific name.  The parent uses this parameter to ensure
@@ -59,19 +59,16 @@ interface nsIDocShellTreeOwner : nsISupp
 	 */
 	void contentShellRemoved(in nsIDocShellTreeItem aContentShell);
 
 	/*
 	Returns the Primary Content Shell
 	*/
 	readonly attribute nsIDocShellTreeItem primaryContentShell;
 
-	[implicit_jscontext]
-	readonly attribute jsval contentWindow;
-
 	/*
 	Tells the tree owner to size its window or parent window in such a way
 	that the shell passed along will be the size specified.
 	*/
 	void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy);
 
 	/*
 	Sets the persistence of different attributes of the window.
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -3617,38 +3617,16 @@ nsGlobalWindow::GetContent(nsIDOMWindow*
   }
 
   domWindow = do_GetInterface(primaryContent);
   domWindow.forget(aContent);
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsGlobalWindow::GetScriptableContent(JSContext* aCx, JS::Value* aVal)
-{
-  nsCOMPtr<nsIDOMWindow> content;
-  nsresult rv = GetContent(getter_AddRefs(content));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (content || !nsContentUtils::IsCallerChrome() || !IsChromeWindow()) {
-    JS::Rooted<JSObject*> global(aCx, JS_GetGlobalForScopeChain(aCx));
-    if (content && global) {
-      nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
-      return nsContentUtils::WrapNative(aCx, global, content, aVal,
-                                        getter_AddRefs(wrapper));
-    }
-    return NS_ERROR_FAILURE;
-  }
-
-  // Something tries to get .content on a ChromeWindow, try to fetch the CPOW.
-  nsCOMPtr<nsIDocShellTreeOwner> treeOwner = GetTreeOwner();
-  NS_ENSURE_TRUE(treeOwner, NS_ERROR_FAILURE);
-  return treeOwner->GetContentWindow(aCx, aVal);
-}
 
 NS_IMETHODIMP
 nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
 {
   FORWARD_TO_OUTER(GetPrompter, (aPrompt), NS_ERROR_NOT_INITIALIZED);
 
   if (!mDocShell)
     return NS_ERROR_FAILURE;
--- a/dom/interfaces/base/nsIBrowserDOMWindow.idl
+++ b/dom/interfaces/base/nsIBrowserDOMWindow.idl
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMWindow;
 interface nsIURI;
 interface nsIFrameLoaderOwner;
 
-[scriptable, uuid(e420bd32-b8c4-4b47-8cca-09e0bddbb0c3)]
+[scriptable, uuid(3ab89888-eb41-4dc8-b347-115555f47c80)]
 
 /**
  * The C++ source has access to the browser script source through
  * nsIBrowserDOMWindow. It is intended to be attached to the chrome DOMWindow
  * of a toplevel browser window (a XUL window). A DOMWindow that does not
  * happen to be a browser chrome window will simply have no access to any such
  * interface.
  */
@@ -87,17 +87,10 @@ interface nsIBrowserDOMWindow : nsISuppo
                                      in short aWhere, in short aContext);
 
   /**
    * @param  aWindow the window to test.
    * @return whether the window is the main content window for any
    *         currently open tab in this toplevel browser window.
    */
   boolean      isTabContentWindow(in nsIDOMWindow aWindow);
-
-  /**
-  * The contentWindow property of the currently selected browser.
-  * This is used to implement .content in remote-Firefox.
-  */
-
-  readonly attribute jsval contentWindow;
 };
 
--- a/dom/interfaces/base/nsIDOMJSWindow.idl
+++ b/dom/interfaces/base/nsIDOMJSWindow.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(f28c92a2-302a-4448-b589-46af599de352)]
+[scriptable, uuid(35b653f4-e679-4843-8391-89cb2f5a9ba4)]
 interface nsIDOMJSWindow : nsISupports
 {
   void                      dump(in DOMString str);
 
   /**
    * These methods take typeless arguments and optional arguments, the
    * first argument is either a function or a string, the second
    * argument must be a number (ms) and the rest of the arguments (2
@@ -61,12 +61,9 @@ interface nsIDOMJSWindow : nsISupports
    * window.frames in Netscape 4.x and IE is just a reference to the
    * window itself (i.e. window.frames === window), but this doesn't
    * make sense from a generic API point of view so that's why this is
    * JS specific.
    *
    * This property is "replaceable" in JavaScript.
    */
   readonly attribute nsIDOMWindow             frames;
-
-  [implicit_jscontext, binaryname(ScriptableContent)]
-  readonly attribute jsval                    content;
 };
--- a/dom/interfaces/base/nsIDOMWindow.idl
+++ b/dom/interfaces/base/nsIDOMWindow.idl
@@ -20,17 +20,17 @@ interface nsIVariant;
  * The nsIDOMWindow interface is the primary interface for a DOM
  * window object. It represents a single window object that may
  * contain child windows if the document in the window contains a
  * HTML frameset document or if the document contains iframe elements.
  *
  * @see <http://www.whatwg.org/html/#window>
  */
 
-[scriptable, uuid(db8ea3c8-6997-460a-8715-0a1cbf20f15d)]
+[scriptable, uuid(be62660a-e3f6-409c-a4a9-378364a9526f)]
 interface nsIDOMWindow : nsISupports
 {
   // the current browsing context
   readonly attribute nsIDOMWindow                       window;
 
   /* [replaceable] self */
   readonly attribute nsIDOMWindow                       self;
 
@@ -355,17 +355,17 @@ interface nsIDOMWindow : nsISupports
   void                      scrollByPages(in long numPages);
 
   /**
    * Method for sizing this window to the content in the window.
    */
   void                      sizeToContent();
 
   /* [replaceable] content */
-  [noscript] readonly attribute nsIDOMWindow            content;
+  readonly attribute nsIDOMWindow                       content;
 
   /* [replaceable] prompter */
   [noscript] readonly attribute nsIPrompt               prompter;
 
   readonly attribute boolean                            closed;
 
   readonly attribute nsIDOMCrypto                       crypto;
   readonly attribute nsIDOMPkcs11                       pkcs11;
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1176,23 +1176,20 @@ PreloadSlowThings()
 {
     // This fetches and creates all the built-in stylesheets.
     nsLayoutStylesheetCache::UserContentSheet();
 
     TabChild::PreloadSlowThings();
 }
 
 bool
-ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID,
-                          const nsCString& name, const nsCString& UAName)
+ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID)
 {
     mAppInfo.version.Assign(version);
     mAppInfo.buildID.Assign(buildID);
-    mAppInfo.name.Assign(name);
-    mAppInfo.UAName.Assign(UAName);
     // If we're part of the mozbrowser machinery, go ahead and start
     // preloading things.  We can only do this for mozbrowser because
     // PreloadSlowThings() may set the docshell of the first TabChild
     // inactive, and we can only safely restore it to active from
     // BrowserElementChild.js.
     if ((mIsForApp || mIsForBrowser) &&
         Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false)) {
         PreloadSlowThings();
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -55,18 +55,16 @@ public:
     virtual ~ContentChild();
     nsrefcnt AddRef() { return 1; }
     nsrefcnt Release() { return 1; }
 
     struct AppInfo
     {
         nsCString version;
         nsCString buildID;
-        nsCString name;
-        nsCString UAName;
     };
 
     bool Init(MessageLoop* aIOLoop,
               base::ProcessHandle aParentHandle,
               IPC::Channel* aChannel);
     void InitXPCOM();
 
     static ContentChild* GetSingleton() {
@@ -191,18 +189,17 @@ public:
 
     virtual bool RecvFlushMemory(const nsString& reason);
 
     virtual bool RecvActivateA11y();
 
     virtual bool RecvGarbageCollect();
     virtual bool RecvCycleCollect();
 
-    virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID,
-                             const nsCString& name, const nsCString& UAName);
+    virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID);
 
     virtual bool RecvLastPrivateDocShellDestroyed();
 
     virtual bool RecvFilePathUpdate(const nsString& aStorageType,
                                     const nsString& aStorageName,
                                     const nsString& aPath,
                                     const nsCString& aReason);
     virtual bool RecvFileSystemUpdate(const nsString& aFsName,
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1128,21 +1128,19 @@ ContentParent::ContentParent(mozIApplica
     nsChromeRegistryChrome* chromeRegistry =
         static_cast<nsChromeRegistryChrome*>(registrySvc.get());
     chromeRegistry->SendRegisteredChrome(this);
     mMessageManager = nsFrameMessageManager::NewProcessMessageManager(this);
 
     if (gAppData) {
         nsCString version(gAppData->version);
         nsCString buildID(gAppData->buildID);
-        nsCString name(gAppData->name);
-        nsCString UAName(gAppData->UAName);
 
         //Sending all information to content process
-        unused << SendAppInfo(version, buildID, name, UAName);
+        unused << SendAppInfo(version, buildID);
     }
 }
 
 ContentParent::~ContentParent()
 {
     if (mForceKillTask) {
         mForceKillTask->Cancel();
     }
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -253,17 +253,17 @@ child:
     GarbageCollect();
     CycleCollect();
     
     /**
      * Start accessibility engine in content process.
      */
     ActivateA11y();
 
-    AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName);
+    AppInfo(nsCString version, nsCString buildID);
 
     // Notify child that last-pb-context-exited notification was observed
     LastPrivateDocShellDestroyed();
 
     FilePathUpdate(nsString storageType, nsString storageName, nsString filepath,
                    nsCString reasons);
 
     FileSystemUpdate(nsString fsName, nsString mountPoint, int32_t fsState,
--- a/dom/ipc/test.xul
+++ b/dom/ipc/test.xul
@@ -248,19 +248,16 @@
       openURI: function (aURI, aOpener, aWhere, aContext) {
         return null;
       },
       isTabContentWindow: function (aWindow) {
         return false;
       },
       openDialog: function(aType, aName, aFeatures, aArguments, aFrameElement) {
         alert(aType + ", " + aName + ", " + aFeatures + ", " + aArguments + ", " + aFrameElement);
-      },
-      get contentWindow() {
-        return null;
       }
     }
 
     function defaultDialogs(useDefault) {
        window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = useDefault ? null : new DialogProvider();
     }
 
     defaultDialogs(false);
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -348,35 +348,26 @@ nsDocShellTreeOwner::ContentShellRemoved
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShellTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
 {
    NS_ENSURE_ARG_POINTER(aShell);
 
-   if (mTreeOwner)
+   if(mTreeOwner)
        return mTreeOwner->GetPrimaryContentShell(aShell);
 
    *aShell = (mPrimaryContentShell ? mPrimaryContentShell : mWebBrowser->mDocShell);
    NS_IF_ADDREF(*aShell);
 
    return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocShellTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
-{
-  if (mTreeOwner)
-    return mTreeOwner->GetContentWindow(aCx, aVal);
-
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 nsDocShellTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
                                  int32_t aCX, int32_t aCY)
 {
    nsCOMPtr<nsIWebBrowserChrome> webBrowserChrome = GetWebBrowserChrome();
 
    NS_ENSURE_STATE(mTreeOwner || webBrowserChrome);
 
    if(mTreeOwner)
--- a/js/ipc/JavaScriptChild.cpp
+++ b/js/ipc/JavaScriptChild.cpp
@@ -429,17 +429,17 @@ JavaScriptChild::AnswerIsExtensible(cons
     if (!obj)
         return false;
 
     JSBool extensible;
     if (!JS_IsExtensible(cx, obj, &extensible))
         return fail(cx, rs);
 
     *result = !!extensible;
-    return ok(rs);
+    return true;
 }
 
 bool
 JavaScriptChild::AnswerCall(const ObjectId &objId, const nsTArray<JSParam> &argv, ReturnStatus *rs,
                             JSVariant *result, nsTArray<JSParam> *outparams)
 {
     AutoSafeJSContext cx;
     JSAutoRequest request(cx);
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -7201,16 +7201,17 @@ JS_GetScriptedGlobal(JSContext *cx)
     if (i.done())
         return cx->global();
     return &i.scopeChain()->global();
 }
 
 JS_PUBLIC_API(JSBool)
 JS_PreventExtensions(JSContext *cx, JS::HandleObject obj)
 {
-    bool extensible;
-    if (!JSObject::isExtensible(cx, obj, &extensible))
-        return false;
-    if (!extensible)
-        return true;
+    JSBool extensible;
+    if (!JS_IsExtensible(cx, obj, &extensible))
+        return JS_TRUE;
+    if (extensible)
+        return JS_TRUE;
+
     return JSObject::preventExtensions(cx, obj);
 }
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2487,20 +2487,16 @@ nsBrowserAccess.prototype = {
 
   openURIInFrame: function browser_openURIInFrame(aURI, aOpener, aWhere, aContext) {
     let browser = this._getBrowser(aURI, aOpener, aWhere, aContext);
     return browser ? browser.QueryInterface(Ci.nsIFrameLoaderOwner) : null;
   },
 
   isTabContentWindow: function(aWindow) {
     return BrowserApp.getBrowserForWindow(aWindow) != null;
-  },
-
-  get contentWindow() {
-    return BrowserApp.selectedBrowser.contentWindow;
   }
 };
 
 
 // track the last known screen size so that new tabs
 // get created with the right size rather than being 1x1
 let gScreenWidth = 1;
 let gScreenHeight = 1;
--- a/toolkit/content/browser-child.js
+++ b/toolkit/content/browser-child.js
@@ -24,73 +24,55 @@ let WebProgressListener = {
 
   _setupJSON: function setupJSON(aWebProgress, aRequest) {
     return {
       isTopLevel: aWebProgress.isTopLevel,
       requestURI: this._requestSpec(aRequest)
     };
   },
 
-  _setupObjects: function setupObjects(aWebProgress) {
-    let win = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
-                      .getInterface(Ci.nsIDOMWindow);
-    return {
-      contentWindow: win,
-      // DOMWindow is not necessarily the content-window with subframes.
-      DOMWindow: aWebProgress.DOMWindow
-    };
-  },
-
   onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     let json = this._setupJSON(aWebProgress, aRequest);
-    let objects = this._setupObjects(aWebProgress);
-
     json.stateFlags = aStateFlags;
     json.status = aStatus;
 
-    sendAsyncMessage("Content:StateChange", json, objects);
+    sendAsyncMessage("Content:StateChange", json);
   },
 
   onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
   },
 
   onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
     let spec = aLocationURI ? aLocationURI.spec : "";
     let charset = content.document.characterSet;
 
     let json = this._setupJSON(aWebProgress, aRequest);
-    let objects = this._setupObjects(aWebProgress);
-
     json.documentURI = aWebProgress.DOMWindow.document.documentURIObject.spec;
     json.location = spec;
     json.canGoBack = docShell.canGoBack;
     json.canGoForward = docShell.canGoForward;
     json.charset = charset.toString();
 
-    sendAsyncMessage("Content:LocationChange", json, objects);
+    sendAsyncMessage("Content:LocationChange", json);
   },
 
   onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     let json = this._setupJSON(aWebProgress, aRequest);
-    let objects = this._setupObjects(aWebProgress);
-
     json.status = aStatus;
     json.message = aMessage;
 
-    sendAsyncMessage("Content:StatusChange", json, objects);
+    sendAsyncMessage("Content:StatusChange", json);
   },
 
   onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
     let json = this._setupJSON(aWebProgress, aRequest);
-    let objects = this._setupObjects(aWebProgress);
-
     json.state = aState;
     json.status = SecurityUI.getSSLStatusAsString();
 
-    sendAsyncMessage("Content:SecurityChange", json, objects);
+    sendAsyncMessage("Content:SecurityChange", json);
   },
 
   QueryInterface: function QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsISupports)) {
         return this;
     }
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -57,26 +57,16 @@
                 readonly="true"/>
 
       <field name="_characterSet">null</field>
 
       <property name="characterSet"
                 onget="return this._characterSet"
                 readonly="true"/>
 
-      <field name="_contentWindow">null</field>
-
-      <property name="contentWindow"
-                onget="return this._contentWindow"
-                readonly="true"/>
-
-      <property name="contentDocument"
-                onget="return this.contentWindow ? this.contentWindow.document : null"
-                readonly="true"/>
-
       <constructor>
         <![CDATA[
           this.messageManager.addMessageListener("DOMTitleChanged", this);
           this.messageManager.loadFrameScript("chrome://global/content/browser-child.js", true);
           this.webProgress._init();
         ]]>
       </constructor>
 
--- a/toolkit/modules/RemoteWebProgress.jsm
+++ b/toolkit/modules/RemoteWebProgress.jsm
@@ -22,17 +22,16 @@ RemoteWebProgressRequest.prototype = {
 
   get URI() { return this.uri.clone(); }
 };
 
 function RemoteWebProgress(browser)
 {
   this._browser = browser;
   this._isDocumentLoading = false;
-  this._DOMWindow = null;
   this._isTopLevel = true;
   this._progressListeners = [];
 }
 
 RemoteWebProgress.prototype = {
   NOTIFY_STATE_REQUEST:  0x00000001,
   NOTIFY_STATE_DOCUMENT: 0x00000002,
   NOTIFY_STATE_NETWORK:  0x00000004,
@@ -56,17 +55,17 @@ RemoteWebProgress.prototype = {
     this._browser.messageManager.removeMessageListener("Content:StateChange", this);
     this._browser.messageManager.removeMessageListener("Content:LocationChange", this);
     this._browser.messageManager.removeMessageListener("Content:SecurityChange", this);
     this._browser.messageManager.removeMessageListener("Content:StatusChange", this);
     this._browser = null;
   },
 
   get isLoadingDocument() { return this._isDocumentLoading },
-  get DOMWindow() { return this._DOMWindow; },
+  get DOMWindow() { return null; },
   get DOMWindowID() { return 0; },
   get isTopLevel() { return this._isTopLevel; },
 
   addProgressListener: function WP_AddProgressListener (aListener) {
     let listener = aListener.QueryInterface(Ci.nsIWebProgressListener);
     this._progressListeners.push(listener);
   },
 
@@ -77,19 +76,17 @@ RemoteWebProgress.prototype = {
 
   _uriSpec: function (spec) {
     if (!spec)
       return null;
     return new RemoteWebProgressRequest(spec);
   },
 
   receiveMessage: function WP_ReceiveMessage(aMessage) {
-    this._DOMWindow = aMessage.objects.DOMWindow;
     this._isTopLevel = aMessage.json.isTopLevel;
-    this._browser._contentWindow = aMessage.objects.contentWindow;
 
     let req = this._uriSpec(aMessage.json.requestURI);
     switch (aMessage.name) {
     case "Content:StateChange":
       for each (let p in this._progressListeners) {
         p.onStateChange(this, req, aMessage.json.stateFlags, aMessage.json.status);
       }
       break;
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -627,19 +627,17 @@ nsXULAppInfo::GetVendor(nsACString& aRes
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULAppInfo::GetName(nsACString& aResult)
 {
   if (XRE_GetProcessType() == GeckoProcessType_Content) {
-    ContentChild* cc = ContentChild::GetSingleton();
-    aResult = cc->GetAppInfo().name;
-    return NS_OK;
+    return NS_ERROR_NOT_AVAILABLE;
   }
   aResult.Assign(gAppData->name);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULAppInfo::GetID(nsACString& aResult)
@@ -693,19 +691,17 @@ nsXULAppInfo::GetPlatformBuildID(nsACStr
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULAppInfo::GetUAName(nsACString& aResult)
 {
   if (XRE_GetProcessType() == GeckoProcessType_Content) {
-    ContentChild* cc = ContentChild::GetSingleton();
-    aResult = cc->GetAppInfo().UAName;
-    return NS_OK;
+    return NS_ERROR_NOT_AVAILABLE;
   }
   aResult.Assign(gAppData->UAName);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULAppInfo::GetLogConsoleErrors(bool *aResult)
--- a/xpfe/appshell/src/nsChromeTreeOwner.cpp
+++ b/xpfe/appshell/src/nsChromeTreeOwner.cpp
@@ -19,18 +19,16 @@
 #include "nsIAuthPrompt.h"
 #include "nsIWebProgress.h"
 #include "nsIWindowMediator.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMNodeList.h"
 #include "nsIDOMXULElement.h"
 #include "nsIXULBrowserWindow.h"
-#include "nsIDOMChromeWindow.h"
-#include "nsIBrowserDOMWindow.h"
 
 // CIDs
 static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
 
 //*****************************************************************************
 // nsChromeTreeOwner string literals
 //*****************************************************************************
 
@@ -242,35 +240,16 @@ nsChromeTreeOwner::ContentShellRemoved(n
 }
 
 NS_IMETHODIMP nsChromeTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
 {
    NS_ENSURE_STATE(mXULWindow);
    return mXULWindow->GetPrimaryContentShell(aShell);
 }
 
-NS_IMETHODIMP
-nsChromeTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
-{
-  NS_ENSURE_STATE(mXULWindow);
-
-  nsCOMPtr<nsIDOMWindow> domWin;
-  mXULWindow->GetWindowDOMWindow(getter_AddRefs(domWin));
-  nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(domWin);
-  if (!chromeWin)
-    return NS_OK;
-
-  nsCOMPtr<nsIBrowserDOMWindow> browserDOMWin;
-  chromeWin->GetBrowserDOMWindow(getter_AddRefs(browserDOMWin));
-  if (!browserDOMWin)
-    return NS_OK;
-
-  return browserDOMWin->GetContentWindow(aVal);
-}
-
 NS_IMETHODIMP nsChromeTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
    int32_t aCX, int32_t aCY)
 {
    NS_ENSURE_STATE(mXULWindow);
    return mXULWindow->SizeShellTo(aShellItem, aCX, aCY);
 }
 
 NS_IMETHODIMP
--- a/xpfe/appshell/src/nsContentTreeOwner.cpp
+++ b/xpfe/appshell/src/nsContentTreeOwner.cpp
@@ -287,30 +287,22 @@ nsContentTreeOwner::ContentShellAdded(ns
 
 NS_IMETHODIMP
 nsContentTreeOwner::ContentShellRemoved(nsIDocShellTreeItem* aContentShell)
 {
   NS_ENSURE_STATE(mXULWindow);
   return mXULWindow->ContentShellRemoved(aContentShell);
 }
 
-NS_IMETHODIMP
-nsContentTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
+NS_IMETHODIMP nsContentTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
 {
    NS_ENSURE_STATE(mXULWindow);
    return mXULWindow->GetPrimaryContentShell(aShell);
 }
 
-NS_IMETHODIMP
-nsContentTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
-{
-  NS_ENSURE_STATE(mXULWindow);
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 NS_IMETHODIMP nsContentTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
    int32_t aCX, int32_t aCY)
 {
    NS_ENSURE_STATE(mXULWindow);
    return mXULWindow->SizeShellTo(aShellItem, aCX, aCY);
 }
 
 NS_IMETHODIMP