diff --git a/js/ipc/CPOWTimer.cpp b/js/ipc/CPOWTimer.cpp index ad39c3d32e..e84f04e79f 100644 --- a/js/ipc/CPOWTimer.cpp +++ b/js/ipc/CPOWTimer.cpp @@ -10,16 +10,6 @@ #include "jsapi.h" -CPOWTimer::CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) - : cx_(nullptr) - , startInterval_(0) -{ - MOZ_GUARD_OBJECT_NOTIFIER_INIT; - if (!js::GetStopwatchIsMonitoringCPOW(cx)) - return; - cx_ = cx; - startInterval_ = JS_Now(); -} CPOWTimer::~CPOWTimer() { if (!cx_) { diff --git a/js/ipc/CPOWTimer.h b/js/ipc/CPOWTimer.h index 173f87b107..2755ee14ad 100644 --- a/js/ipc/CPOWTimer.h +++ b/js/ipc/CPOWTimer.h @@ -21,7 +21,16 @@ */ class MOZ_RAII CPOWTimer final { public: - explicit inline CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM); + explicit inline + CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) : cx_(nullptr) + , startInterval_(0) + { + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + if (!js::GetStopwatchIsMonitoringCPOW(cx)) + return; + cx_ = cx; + startInterval_ = JS_Now(); + } ~CPOWTimer(); private: