mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
5bdf9eae23
* * * try: -b do -p linux64-b2g-haz -u none
19 lines
855 B
C++
19 lines
855 B
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 "xpcprivate.h"
|
|
#include "CPOWTimer.h"
|
|
|
|
CPOWTimer::~CPOWTimer() {
|
|
/* This is a best effort to find the compartment responsible for this CPOW call */
|
|
xpc::CompartmentPrivate* compartment = xpc::CompartmentPrivate::Get(js::GetObjectCompartment(mozilla::dom::GetIncumbentGlobal()
|
|
->GetGlobalJSObject()));
|
|
PRIntervalTime time = PR_IntervalNow() - startInterval;
|
|
compartment->CPOWTime += time;
|
|
}
|