Bug 1492011 change ShouldIncludeStackTrace from instance to class method r=baku
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 24 Mar 2020 09:01:04 +0000
changeset 520315 25d1b2fe703d7adf198daa80690e9c0c0db367bf
parent 520314 2ffea3b36683d899950541a75273edf8855432da
child 520316 87aac4032d221a82f2eac618e22da5bd5fe3d93b
push id37247
push userbtara@mozilla.com
push dateWed, 25 Mar 2020 09:34:57 +0000
treeherdermozilla-central@2abd352490a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1492011
milestone76.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 1492011 change ShouldIncludeStackTrace from instance to class method r=baku Depends on D67991 Differential Revision: https://phabricator.services.mozilla.com/D67992
dom/console/Console.cpp
dom/console/Console.h
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -2295,17 +2295,18 @@ JS::Value Console::CreateCounterOrResetC
   JS::Rooted<JS::Value> value(aCx);
   if (!ToJSValue(aCx, data, &value)) {
     return JS::UndefinedValue();
   }
 
   return value;
 }
 
-bool Console::ShouldIncludeStackTrace(MethodName aMethodName) const {
+/* static */
+bool Console::ShouldIncludeStackTrace(MethodName aMethodName) {
   switch (aMethodName) {
     case MethodError:
     case MethodException:
     case MethodAssert:
     case MethodTrace:
       return true;
     default:
       return false;
--- a/dom/console/Console.h
+++ b/dom/console/Console.h
@@ -387,17 +387,17 @@ class Console final : public nsIObserver
   // * aCx - this is the context that will root the returned value.
   // * aCountLabel - this label must be what IncreaseCounter received as
   //                 aTimerLabel.
   // * aCountValue - the return value of IncreaseCounter.
   JS::Value CreateCounterOrResetCounterValue(JSContext* aCx,
                                              const nsAString& aCountLabel,
                                              uint32_t aCountValue) const;
 
-  bool ShouldIncludeStackTrace(MethodName aMethodName) const;
+  static bool ShouldIncludeStackTrace(MethodName aMethodName);
 
   JSObject* GetOrCreateSandbox(JSContext* aCx, nsIPrincipal* aPrincipal);
 
   void AssertIsOnOwningThread() const;
 
   bool IsShuttingDown() const;
 
   bool MonotonicTimer(JSContext* aCx, MethodName aMethodName,