Bug 1018486 - Part 11: Changes required for beta uplift. r=ehsan, a=ritu
authorMichael Layzell <michael@thelayzells.com>
Wed, 21 Sep 2016 22:20:15 -0400
changeset 350358 bbc17cba352e6481ee79370a8cd78a0e84ee1a14
parent 350357 3ec85c5489927717bd2bcd9cd4d3881d9d44c4ef
child 350359 481e66f52d72c66d5270a60cebd6f32d4cd657fa
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, ritu
bugs1018486
milestone50.0
Bug 1018486 - Part 11: Changes required for beta uplift. r=ehsan, a=ritu MozReview-Commit-ID: IfvQRe0kIDM
dom/base/nsDocument.cpp
dom/base/nsLocation.cpp
dom/xml/nsXMLFragmentContentSink.cpp
dom/xul/nsXULElement.cpp
mfbt/tests/TestNotNull.cpp
netwerk/ipc/ChannelEventQueue.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
xpcom/tests/TestCOMPtr.cpp
xpcom/tests/TestNsRefPtr.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -4817,18 +4817,17 @@ nsDocument::GetScriptHandlingObjectInter
   return scriptHandlingObject;
 }
 void
 nsDocument::SetScriptHandlingObject(nsIScriptGlobalObject* aScriptObject)
 {
   NS_ASSERTION(!mScriptGlobalObject ||
                mScriptGlobalObject == aScriptObject,
                "Wrong script object!");
-  // XXXkhuey why bother?
-  nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(aScriptObject);
+  nsCOMPtr<nsIScriptGlobalObject> kungFuDeathGrip(aScriptObject);
   if (aScriptObject) {
     mScopeObject = do_GetWeakReference(aScriptObject);
     mHasHadScriptHandlingObject = true;
     mHasHadDefaultView = false;
   }
 }
 
 bool
@@ -10853,17 +10852,16 @@ nsIDocument::CaretPositionFromPoint(floa
 
   nsCOMPtr<nsIContent> node = offsets.content;
   uint32_t offset = offsets.offset;
   nsCOMPtr<nsIContent> anonNode = node;
   bool nodeIsAnonymous = node && node->IsInNativeAnonymousSubtree();
   if (nodeIsAnonymous) {
     node = ptFrame->GetContent();
     nsIContent* nonanon = node->FindFirstNonChromeOnlyAccessContent();
-    nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(nonanon);
     nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea = do_QueryInterface(nonanon);
     nsITextControlFrame* textFrame = do_QueryFrame(nonanon->GetPrimaryFrame());
     if (!!textFrame) {
       // If the anonymous content node has a child, then we need to make sure
       // that we get the appropriate child, as otherwise the offset may not be
       // correct when we construct a range for it.
       nsCOMPtr<nsIContent> firstChild = anonNode->GetFirstChild();
       if (firstChild) {
--- a/dom/base/nsLocation.cpp
+++ b/dom/base/nsLocation.cpp
@@ -258,17 +258,16 @@ nsLocation::GetWritableURI(nsIURI** aURI
 }
 
 nsresult
 nsLocation::SetURI(nsIURI* aURI, bool aReplace)
 {
   nsCOMPtr<nsIDocShell> docShell(do_QueryReferent(mDocShell));
   if (docShell) {
     nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
-    nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
 
     if(NS_FAILED(CheckURL(aURI, getter_AddRefs(loadInfo))))
       return NS_ERROR_FAILURE;
 
     if (aReplace) {
       loadInfo->SetLoadType(nsIDocShellLoadInfo::loadStopContentAndReplace);
     } else {
       loadInfo->SetLoadType(nsIDocShellLoadInfo::loadStopContent);
--- a/dom/xml/nsXMLFragmentContentSink.cpp
+++ b/dom/xml/nsXMLFragmentContentSink.cpp
@@ -162,18 +162,16 @@ nsXMLFragmentContentSink::WillBuildModel
   mRoot = new DocumentFragment(mNodeInfoManager);
   
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsXMLFragmentContentSink::DidBuildModel(bool aTerminated)
 {
-  RefPtr<nsParserBase> kungFuDeathGrip(mParser);
-
   // Drop our reference to the parser to get rid of a circular
   // reference.
   mParser = nullptr;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP 
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -1708,17 +1708,17 @@ nsXULElement::Focus()
     Focus(rv);
     return rv.StealNSResult();
 }
 
 void
 nsXULElement::Focus(ErrorResult& rv)
 {
     nsIFocusManager* fm = nsFocusManager::GetFocusManager();
-    nsCOMPtr<nsIDOMElement> elem = do_QueryObject(this);
+    RefPtr<nsXULElement> kungFuDeathGrip(this);
     if (fm) {
         rv = fm->SetFocus(this, 0);
     }
 }
 
 NS_IMETHODIMP
 nsXULElement::Blur()
 {
--- a/mfbt/tests/TestNotNull.cpp
+++ b/mfbt/tests/TestNotNull.cpp
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "mozilla/NotNull.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/UniquePtr.h"
-#include "mozilla/Unused.h"
+#include "mozilla/unused.h"
 
 using mozilla::WrapNotNull;
 using mozilla::MakeUnique;
 using mozilla::NotNull;
 using mozilla::UniquePtr;
 
 #define CHECK MOZ_RELEASE_ASSERT
 
--- a/netwerk/ipc/ChannelEventQueue.cpp
+++ b/netwerk/ipc/ChannelEventQueue.cpp
@@ -3,17 +3,17 @@
  */
 /* 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 "nsISupports.h"
 #include "mozilla/net/ChannelEventQueue.h"
 #include "nsThreadUtils.h"
-#include "mozilla/Unused.h"
+#include "mozilla/unused.h"
 
 namespace mozilla {
 namespace net {
 
 ChannelEvent*
 ChannelEventQueue::TakeEvent()
 {
   MutexAutoLock lock(mMutex);
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -45,16 +45,17 @@
 #include "HashStore.h"
 #include "Classifier.h"
 #include "ProtocolParser.h"
 #include "mozilla/Attributes.h"
 #include "nsIPrincipal.h"
 #include "Classifier.h"
 #include "ProtocolParser.h"
 #include "nsContentUtils.h"
+#include "mozilla/unused.h"
 
 using namespace mozilla;
 using namespace mozilla::safebrowsing;
 
 // MOZ_LOG=UrlClassifierDbService:5
 LazyLogModule gUrlClassifierDbServiceLog("UrlClassifierDbService");
 #define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
 #define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
--- a/xpcom/tests/TestCOMPtr.cpp
+++ b/xpcom/tests/TestCOMPtr.cpp
@@ -2,17 +2,17 @@
 /* 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 <assert.h>
 #include <stdio.h>
 #include "nsCOMPtr.h"
 #include "nsISupports.h"
-#include "mozilla/Unused.h"
+#include "mozilla/unused.h"
 
 #define NS_IFOO_IID \
 { 0x6f7652e0,  0xee43, 0x11d1, \
  { 0x9c, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
 
 class IFoo : public nsISupports
   {
 		public:
--- a/xpcom/tests/TestNsRefPtr.cpp
+++ b/xpcom/tests/TestNsRefPtr.cpp
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <assert.h>
 #include <stdio.h>
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsISupports.h"
 #include "nsQueryObject.h"
-#include "mozilla/Unused.h"
+#include "mozilla/unused.h"
 
 #define NS_FOO_IID \
 { 0x6f7652e0,  0xee43, 0x11d1, \
  { 0x9c, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
 
 class Foo : public nsISupports
   {
 		public: