Issue #80 - Move implementation of CPOWTimer::CPOWTimer to header.

Fixes link bustage in xul.dll
Inline functions must be implemented in the header.
This commit is contained in:
Job Bautista 2023-03-12 22:04:36 +08:00 • committed by roytam1
commit c2c95eff97
2 changed files with 10 additions and 11 deletions

View file

@ -10,16 +10,6 @@
#include "jsapi.h" #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() CPOWTimer::~CPOWTimer()
{ {
if (!cx_) { if (!cx_) {

View file

@ -21,7 +21,16 @@
*/ */
class MOZ_RAII CPOWTimer final { class MOZ_RAII CPOWTimer final {
public: 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(); ~CPOWTimer();
private: private: