Bug 1102964 - Fix optimized build unused variables warnings in Debugger.cpp. r=jimb
authorBenjamin Peterson <benjamin@python.org>
Fri, 21 Nov 2014 18:55:36 -0500
changeset 241289 24bebb8f489a86f9d2a97aa594c11e237b5ded6f
parent 241288 2a1e5fe6f2892eff40ace8eedface5fd8a533747
child 241290 fcf715632ae005b3fae926661a9ef01fb855db60
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb
bugs1102964
milestone36.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 1102964 - Fix optimized build unused variables warnings in Debugger.cpp. r=jimb
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -37,16 +37,17 @@
 #include "vm/NativeObject-inl.h"
 #include "vm/Stack-inl.h"
 
 using namespace js;
 
 using JS::dbg::Builder;
 using js::frontend::IsIdentifier;
 using mozilla::ArrayLength;
+using mozilla::DebugOnly;
 using mozilla::Maybe;
 
 
 /*** Forward declarations ************************************************************************/
 
 extern const Class DebuggerFrame_class;
 
 enum {
@@ -1277,16 +1278,17 @@ Debugger::dispatchHook(JSContext *cx, Mu
                 st = dbg->fireExceptionUnwind(cx, vp);
                 break;
               case OnNewPromise:
               case OnPromiseSettled:
                 st = dbg->firePromiseHook(cx, which, payload, vp);
                 break;
               default:
                 MOZ_ASSERT_UNREACHABLE("Unexpected debugger hook");
+                st = JSTRAP_CONTINUE;
             }
             if (st != JSTRAP_CONTINUE)
                 return st;
         }
     }
     return JSTRAP_CONTINUE;
 }
 
@@ -1671,17 +1673,17 @@ Debugger::firePromiseHook(JSContext *cx,
     return status;
 }
 
 /* static */ void
 Debugger::slowPathPromiseHook(JSContext *cx, Hook hook, HandleObject promise)
 {
     MOZ_ASSERT(hook == OnNewPromise || hook == OnPromiseSettled);
     RootedValue rval(cx);
-    JSTrapStatus status = dispatchHook(cx, &rval, hook, promise);
+    DebugOnly<JSTrapStatus> status = dispatchHook(cx, &rval, hook, promise);
     MOZ_ASSERT(status == JSTRAP_CONTINUE);
     MOZ_ASSERT(!cx->isExceptionPending());
 }
 
 
 /*** Debugger code invalidation for observing execution ******************************************/
 
 class MOZ_STACK_CLASS ExecutionObservableCompartments : public Debugger::ExecutionObservableSet