Bug 860941 - Remove mArgumentsLast. r=jst
authorBobby Holley <bobbyholley@gmail.com>
Fri, 17 May 2013 10:43:18 -0700
changeset 132263 7bcc1ec6fa87c79452835eacb57c113c542ac873
parent 132262 132a424d1a2830871295bdeae65a277aa46e8572
child 132264 76ab368d6b5551a2be95152289cfed26309dde2d
push id24691
push userryanvm@gmail.com
push dateSat, 18 May 2013 01:41:18 +0000
treeherdermozilla-central@6e2789a70f6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs860941
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 860941 - Remove mArgumentsLast. r=jst I'm not sure what it used to do, but it sure doesn't do a damn thing now.
dom/base/nsGlobalWindow.cpp
dom/base/nsGlobalWindow.h
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1390,17 +1390,16 @@ nsGlobalWindow::CleanUp(bool aIgnoreModa
     if (asChrome->mMessageManager) {
       static_cast<nsFrameMessageManager*>(
         asChrome->mMessageManager.get())->Disconnect();
     }
   }
 
   mInnerWindowHolder = nullptr;
   mArguments = nullptr;
-  mArgumentsLast = nullptr;
   mArgumentsOrigin = nullptr;
 
   CleanupCachedXBLHandlers(this);
 
   if (mIdleTimer) {
     mIdleTimer->Cancel();
     mIdleTimer = nullptr;
   }
@@ -1619,17 +1618,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   if (!cb.WantAllTraces() && tmp->IsBlackForCC()) {
     return NS_SUCCESS_INTERRUPTED_TRAVERSE;
   }
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mContext)
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mControllers)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mArguments)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mArgumentsLast)
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPerformance)
 
 #ifdef MOZ_WEBSPEECH
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSpeechSynthesis)
 #endif
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mInnerWindowHolder)
@@ -1666,17 +1664,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow)
   nsGlobalWindow::CleanupCachedXBLHandlers(tmp);
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mContext)
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mControllers)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mArguments)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mArgumentsLast)
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mPerformance)
 
 #ifdef MOZ_WEBSPEECH
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mSpeechSynthesis)
 #endif
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mInnerWindowHolder)
@@ -2733,17 +2730,16 @@ nsGlobalWindow::DetachFromDocShell()
   ClearControllers();
 
   mChromeEventHandler = nullptr; // force release now
 
   if (mArguments) { 
     // We got no new document after someone called
     // SetArguments(), drop our reference to the arguments.
     mArguments = nullptr;
-    mArgumentsLast = nullptr;
     mArgumentsOrigin = nullptr;
   }
 
   if (mContext) {
     mContext->GC(JS::gcreason::SET_DOC_SHELL);
     mContext = nullptr;
   }
 
@@ -3150,19 +3146,17 @@ nsGlobalWindow::SetArguments(nsIArray *a
 
   // Hold on to the arguments so that we can re-set them once the next
   // document is loaded.
   mArguments = aArguments;
   mArgumentsOrigin = aOrigin;
 
   nsGlobalWindow *currentInner = GetCurrentInnerWindowInternal();
 
-  if (!mIsModalContentWindow) {
-    mArgumentsLast = aArguments;
-  } else if (currentInner) {
+  if (mIsModalContentWindow && currentInner) {
     // SetArguments() is being called on a modal content window that
     // already has an inner window. This can happen when loading
     // javascript: URIs as modal content dialogs. In this case, we'll
     // set up the dialog window, both inner and outer, before we call
     // SetArguments() on the window, so to deal with that, make sure
     // here that the arguments are propagated to the inner window.
 
     currentInner->mArguments = aArguments;
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -1109,17 +1109,16 @@ protected:
   // whether scripts may close the window,
   // even if "dom.allow_scripts_to_close_windows" is false.
   bool                   mAllowScriptsToClose : 1;
 
   nsCOMPtr<nsIScriptContext>    mContext;
   nsWeakPtr                     mOpener;
   nsCOMPtr<nsIControllers>      mControllers;
   nsCOMPtr<nsIArray>            mArguments;
-  nsCOMPtr<nsIArray>            mArgumentsLast;
   nsCOMPtr<nsIPrincipal>        mArgumentsOrigin;
   nsRefPtr<Navigator>           mNavigator;
   nsRefPtr<nsScreen>            mScreen;
   nsRefPtr<nsDOMWindowList>     mFrames;
   nsRefPtr<nsBarProp>           mMenubar;
   nsRefPtr<nsBarProp>           mToolbar;
   nsRefPtr<nsBarProp>           mLocationbar;
   nsRefPtr<nsBarProp>           mPersonalbar;