From c2c95eff9764b6c179a772bcc14d7c4d056186c2 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Sun, 12 Mar 2023 22:04:36 +0800 Subject: [PATCH] Issue #80 - Move implementation of CPOWTimer::CPOWTimer to header. Fixes link bustage in xul.dll Inline functions must be implemented in the header. --- js/ipc/CPOWTimer.cpp | 10 ---------- js/ipc/CPOWTimer.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) 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: