Bug 1299812 - Remove mLineNumber member of mozilla::dom::Exception. r=bkelly
authorMs2ger <Ms2ger@gmail.com>
Mon, 05 Sep 2016 10:35:10 +0200
changeset 354438 7cd3bccd9cfef1b8f8feff8dee413b5341f012c2
parent 354437 4b1be484aab80b6029608e6a25002537f6690da7
child 354439 844899534edbfdf848bdded4e61197f24d8813c8
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)
reviewersbkelly
bugs1299812
milestone51.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 1299812 - Remove mLineNumber member of mozilla::dom::Exception. r=bkelly
dom/base/DOMException.cpp
dom/base/DOMException.h
--- a/dom/base/DOMException.cpp
+++ b/dom/base/DOMException.cpp
@@ -196,17 +196,16 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CI_INTERFACE_GETTER(Exception, nsIXPCException)
 
 Exception::Exception(const nsACString& aMessage,
                      nsresult aResult,
                      const nsACString& aName,
                      nsIStackFrame *aLocation,
                      nsISupports *aData)
 : mResult(NS_OK),
-  mLineNumber(0),
   mInitialized(false),
   mHoldingJSVal(false)
 {
   // A little hack... The nsIGenericModule nsIClassInfo scheme relies on there
   // having been at least one instance made via the factory. Otherwise, the
   // shared factory/classinsance object never gets created and our QI getter
   // for our instance's pointer to our nsIClassInfo will always return null.
   // This is bad because it means that wrapped exceptions will never have a
@@ -218,17 +217,16 @@ Exception::Exception(const nsACString& a
     sEverMadeOneFromFactory = true;
   }
 
   Initialize(aMessage, aResult, aName, aLocation, aData);
 }
 
 Exception::Exception()
   : mResult(NS_OK),
-    mLineNumber(-1),
     mInitialized(false),
     mHoldingJSVal(false)
 {
 }
 
 Exception::~Exception()
 {
   if (mHoldingJSVal) {
@@ -328,17 +326,17 @@ Exception::GetLineNumber(JSContext* aCx,
 
   if (mLocation) {
     int32_t lineno;
     nsresult rv = mLocation->GetLineNumber(aCx, &lineno);
     *aLineNumber = lineno;
     return rv;
   }
 
-  *aLineNumber = mLineNumber;
+  *aLineNumber = 0;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 Exception::GetColumnNumber(uint32_t* aColumnNumber)
 {
   NS_ENSURE_ARG_POINTER(aColumnNumber);
   NS_ENSURE_TRUE(mInitialized, NS_ERROR_NOT_INITIALIZED);
@@ -479,17 +477,17 @@ Exception::LineNumber(JSContext* aCx) co
   if (mLocation) {
     int32_t lineno;
     if (NS_SUCCEEDED(mLocation->GetLineNumber(aCx, &lineno))) {
       return lineno;
     }
     return 0;
   }
 
-  return mLineNumber;
+  return 0;
 }
 
 uint32_t
 Exception::ColumnNumber() const
 {
   return 0;
 }
 
--- a/dom/base/DOMException.h
+++ b/dom/base/DOMException.h
@@ -131,17 +131,16 @@ protected:
     }
   }
 
   nsCString       mMessage;
   nsresult        mResult;
   nsCString       mName;
   nsCOMPtr<nsIStackFrame> mLocation;
   nsCOMPtr<nsISupports> mData;
-  int             mLineNumber;
   bool            mInitialized;
 
   bool mHoldingJSVal;
   JS::Heap<JS::Value> mThrownJSVal;
 
 private:
   static bool sEverMadeOneFromFactory;
 };