Bug 1279998 - Remove NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Mon, 01 Aug 2016 11:16:19 -0700
changeset 348825 23457f1d08dfa1fa19494da84c5ac7e7732a2536
parent 348824 ed95bb78b383b92d422d83ff0b26a2aaf087c5d8
child 348826 45170a42e54cddbd9b72d98953ff2d8225782bf7
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1279998
milestone50.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 1279998 - Remove NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS. r=froydnj MozReview-Commit-ID: LbT6922qlHQ
xpcom/glue/nsCOMPtr.cpp
xpcom/glue/nsCOMPtr.h
--- a/xpcom/glue/nsCOMPtr.cpp
+++ b/xpcom/glue/nsCOMPtr.cpp
@@ -7,37 +7,29 @@
 #include "nsCOMPtr.h"
 
 nsresult
 nsQueryInterface::operator()(const nsIID& aIID, void** aAnswer) const
 {
   nsresult status;
   if (mRawPtr) {
     status = mRawPtr->QueryInterface(aIID, aAnswer);
-#ifdef NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS
-    NS_ASSERTION(NS_SUCCEEDED(status),
-                 "interface not found---were you expecting that?");
-#endif
   } else {
     status = NS_ERROR_NULL_POINTER;
   }
 
   return status;
 }
 
 nsresult
 nsQueryInterfaceWithError::operator()(const nsIID& aIID, void** aAnswer) const
 {
   nsresult status;
   if (mRawPtr) {
     status = mRawPtr->QueryInterface(aIID, aAnswer);
-#ifdef NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS
-    NS_ASSERTION(NS_SUCCEEDED(status),
-                 "interface not found---were you expecting that?");
-#endif
   } else {
     status = NS_ERROR_NULL_POINTER;
   }
 
   if (mErrorPtr) {
     *mErrorPtr = status;
   }
   return status;
--- a/xpcom/glue/nsCOMPtr.h
+++ b/xpcom/glue/nsCOMPtr.h
@@ -51,17 +51,16 @@
   #pragma warning( disable: 4514 )
 #endif
 
 #define NSCAP_FEATURE_USE_BASE
 
 #ifdef DEBUG
   #define NSCAP_FEATURE_TEST_DONTQUERY_CASES
   #undef NSCAP_FEATURE_USE_BASE
-//#define NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS
 #endif
 
 #ifdef __GNUC__
   // Our use of nsCOMPtr_base::mRawPtr violates the C++ standard's aliasing
   // rules. Mark it with the may_alias attribute so that gcc 3.3 and higher
   // don't reorder instructions based on aliasing assumptions for
   // this variable.  Fortunately, gcc versions < 3.3 do not do any
   // optimizations that break nsCOMPtr.