mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
d7187c26b6
- pointer style (73474b840) - Bug 1152784 - Be more robust about possible intermediate wrappers in IsFrameId. r=bz (fb81861cc) - pointer style (c0b667212) - Bug 1180123 (part 1) - Report the size of the saved stacks sets. r=fitzgen. (e6c3a9609) - Bug 1180123 (part 2) - Minor nursery report fixes. r=terrence. (172525db9) - Bug 1181175 - Use RDTSC for Performance Monitoring instead of getrusage. r=jandem (b970bf5f1) - Bug 1190436 - Part 1: Use more smart pointers in XPConnect. r=gabor (c80d65dee) - Bug 1190436 - Part 2: Use an early return in XPCConvert::JSObject2NativeInterface. r=gabor (ef2123643) - Bug 1161491 - schedulePreciseGC should use the normal GC triggering mechanisms, r=mccr8 (42cdfa847) - pointer style (8a147bec5) - Bug 1155773 - Remove gotos from XPCConvert::NativeArray2JS(). r=bholley (a8858d358) - Bug 1164061 - WebRTC - move TMMBR behind pref r=jesup (36ba20713) - Bug 1164061 - Backout signaling unittest changes for tmmbr r=jesup (f2fbd86be) - Bug 1165520: Negotiate rtcp-fb r=jesup (449edaa83) - Bug 1165129: Allow JS to reorder codecs in a local answer. Also means that we'll take the ordering more seriously when we see multiple codecs in a remote answer. r=jesup (c1ab58747) - Bug 818640 - Test that using dynamic payload types < 96 works. r=mt (dfa3418cf) - Bug 952145: Rollback support r=mt, r=smaug (28182262b) - code style (ecaf69b5a) - Bug 1187773 - Don't include heapapi.h from js/public. r=jorendorff (40179ec4e) - pointer style (f6e3d0610) - Bug 1196590 - Don't assume that objects without shapes are unboxed plain objects, r=jandem. (75cd29b7b) - Bug 1194430 - Always mark the global jitcode table during major GCs. (r=djvj) (772e96665) - Bug 1036574 - Revert horrible workaround in baseline IC for magic arg callee. (r=me) (b5f11337a) - spurious spaces (80b22a36a)
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
* vim: set ts=4 sw=4 et tw=80:
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "jsfriendapi.h"
|
|
#include "nsContentUtils.h"
|
|
#include "CPOWTimer.h"
|
|
|
|
#include "jsapi.h"
|
|
|
|
CPOWTimer::CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
|
: cx_(nullptr)
|
|
, startInterval_(0)
|
|
{
|
|
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
|
JSRuntime* runtime = JS_GetRuntime(cx);
|
|
if (!js::GetStopwatchIsMonitoringCPOW(runtime))
|
|
return;
|
|
cx_ = cx;
|
|
startInterval_ = JS_Now();
|
|
}
|
|
CPOWTimer::~CPOWTimer()
|
|
{
|
|
if (!cx_) {
|
|
// Monitoring was off when we started the timer.
|
|
return;
|
|
}
|
|
|
|
JSRuntime* runtime = JS_GetRuntime(cx_);
|
|
if (!js::GetStopwatchIsMonitoringCPOW(runtime)) {
|
|
// Monitoring has been deactivated while we were in the timer.
|
|
return;
|
|
}
|
|
|
|
const int64_t endInterval = JS_Now();
|
|
if (endInterval <= startInterval_) {
|
|
// Do not assume monotonicity.
|
|
return;
|
|
}
|
|
|
|
js::AddCPOWPerformanceDelta(runtime, endInterval - startInterval_);
|
|
}
|