2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-02-27 23:39:00 +00:00
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_Console_h
|
|
|
|
#define mozilla_dom_Console_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
|
|
|
#include "mozilla/ErrorResult.h"
|
2015-07-21 18:31:44 +00:00
|
|
|
#include "mozilla/JSObjectHolder.h"
|
2014-02-27 23:39:00 +00:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsDataHashtable.h"
|
|
|
|
#include "nsHashKeys.h"
|
2014-02-27 23:39:17 +00:00
|
|
|
#include "nsIObserver.h"
|
2016-01-21 13:17:33 +00:00
|
|
|
#include "nsWeakReference.h"
|
2014-02-27 23:39:00 +00:00
|
|
|
#include "nsWrapperCache.h"
|
2014-10-01 18:43:26 +00:00
|
|
|
#include "nsDOMNavigationTiming.h"
|
|
|
|
#include "nsPIDOMWindow.h"
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
class nsIConsoleAPIStorage;
|
2015-07-01 13:56:00 +00:00
|
|
|
class nsIPrincipal;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
class AnyCallback;
|
2014-02-27 23:39:00 +00:00
|
|
|
class ConsoleCallData;
|
2016-02-07 10:29:12 +00:00
|
|
|
class ConsoleRunnable;
|
|
|
|
class ConsoleCallDataRunnable;
|
|
|
|
class ConsoleProfileRunnable;
|
2014-06-19 00:57:51 +00:00
|
|
|
struct ConsoleStackEntry;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
class Console final : public nsIObserver
|
2015-03-27 18:52:19 +00:00
|
|
|
, public nsWrapperCache
|
2016-01-21 13:17:33 +00:00
|
|
|
, public nsSupportsWeakReference
|
2014-02-27 23:39:00 +00:00
|
|
|
{
|
2014-06-23 19:56:07 +00:00
|
|
|
~Console();
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2016-01-21 13:17:33 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Console, nsIObserver)
|
2014-02-27 23:39:17 +00:00
|
|
|
NS_DECL_NSIOBSERVER
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
static already_AddRefed<Console>
|
|
|
|
Create(nsPIDOMWindowInner* aWindow, ErrorResult& aRv);
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
// WebIDL methods
|
2016-01-30 17:05:36 +00:00
|
|
|
nsPIDOMWindowInner* GetParentObject() const
|
2014-02-27 23:39:00 +00:00
|
|
|
{
|
|
|
|
return mWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual JSObject*
|
2015-03-21 16:28:04 +00:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
Log(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Info(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Warn(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Error(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Exception(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Debug(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
2014-08-27 22:32:32 +00:00
|
|
|
void
|
|
|
|
Table(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
void
|
|
|
|
Trace(JSContext* aCx);
|
|
|
|
|
|
|
|
void
|
|
|
|
Dir(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
2015-04-29 15:34:00 +00:00
|
|
|
void
|
|
|
|
Dirxml(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
void
|
|
|
|
Group(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
GroupCollapsed(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
GroupEnd(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
Time(JSContext* aCx, const JS::Handle<JS::Value> aTime);
|
|
|
|
|
|
|
|
void
|
|
|
|
TimeEnd(JSContext* aCx, const JS::Handle<JS::Value> aTime);
|
|
|
|
|
2015-04-29 19:48:57 +00:00
|
|
|
void
|
|
|
|
TimeStamp(JSContext* aCx, const JS::Handle<JS::Value> aData);
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
void
|
2014-04-29 06:49:57 +00:00
|
|
|
Profile(JSContext* aCx, const Sequence<JS::Value>& aData);
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
void
|
2014-04-29 06:49:57 +00:00
|
|
|
ProfileEnd(JSContext* aCx, const Sequence<JS::Value>& aData);
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
Assert(JSContext* aCx, bool aCondition, const Sequence<JS::Value>& aData);
|
|
|
|
|
2014-02-27 23:39:24 +00:00
|
|
|
void
|
|
|
|
Count(JSContext* aCx, const Sequence<JS::Value>& aData);
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
void
|
2015-03-06 08:50:51 +00:00
|
|
|
NoopMethod();
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
void
|
|
|
|
ClearStorage();
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
void
|
|
|
|
RetrieveConsoleEvents(JSContext* aCx, nsTArray<JS::Value>& aEvents,
|
|
|
|
ErrorResult& aRv);
|
|
|
|
|
|
|
|
void
|
2016-03-29 14:56:10 +00:00
|
|
|
SetConsoleEventHandler(AnyCallback* aHandler);
|
2016-03-23 21:55:07 +00:00
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
private:
|
2016-03-23 21:55:07 +00:00
|
|
|
explicit Console(nsPIDOMWindowInner* aWindow);
|
|
|
|
|
|
|
|
void
|
|
|
|
Initialize(ErrorResult& aRv);
|
|
|
|
|
|
|
|
void
|
|
|
|
Shutdown();
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
enum MethodName
|
|
|
|
{
|
|
|
|
MethodLog,
|
|
|
|
MethodInfo,
|
|
|
|
MethodWarn,
|
|
|
|
MethodError,
|
|
|
|
MethodException,
|
|
|
|
MethodDebug,
|
2014-08-27 22:32:32 +00:00
|
|
|
MethodTable,
|
2014-02-27 23:39:00 +00:00
|
|
|
MethodTrace,
|
|
|
|
MethodDir,
|
2015-04-29 15:34:00 +00:00
|
|
|
MethodDirxml,
|
2014-02-27 23:39:00 +00:00
|
|
|
MethodGroup,
|
|
|
|
MethodGroupCollapsed,
|
|
|
|
MethodGroupEnd,
|
|
|
|
MethodTime,
|
|
|
|
MethodTimeEnd,
|
2015-04-29 19:48:57 +00:00
|
|
|
MethodTimeStamp,
|
2014-02-27 23:39:24 +00:00
|
|
|
MethodAssert,
|
|
|
|
MethodCount
|
2014-02-27 23:39:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void
|
|
|
|
Method(JSContext* aCx, MethodName aName, const nsAString& aString,
|
|
|
|
const Sequence<JS::Value>& aData);
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
// This method must receive aCx and aArguments in the same JSCompartment.
|
2014-02-27 23:39:00 +00:00
|
|
|
void
|
2016-03-23 21:55:07 +00:00
|
|
|
ProcessCallData(JSContext* aCx,
|
|
|
|
ConsoleCallData* aData,
|
2016-02-07 10:29:12 +00:00
|
|
|
const Sequence<JS::Value>& aArguments);
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
void
|
|
|
|
StoreCallData(ConsoleCallData* aData);
|
|
|
|
|
|
|
|
void
|
|
|
|
UnstoreCallData(ConsoleCallData* aData);
|
|
|
|
|
|
|
|
// Read in Console.cpp how this method is used.
|
|
|
|
void
|
|
|
|
ReleaseCallData(ConsoleCallData* aCallData);
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
// aCx and aArguments must be in the same JS compartment.
|
2016-03-23 21:55:07 +00:00
|
|
|
void
|
|
|
|
NotifyHandler(JSContext* aCx,
|
|
|
|
const Sequence<JS::Value>& aArguments,
|
|
|
|
ConsoleCallData* aData) const;
|
|
|
|
|
2016-03-24 08:29:08 +00:00
|
|
|
// PopulateConsoleNotificationInTheTargetScope receives aCx and aArguments in
|
|
|
|
// the same JS compartment and populates the ConsoleEvent object (aValue) in
|
|
|
|
// the aTargetScope.
|
2016-03-23 21:55:07 +00:00
|
|
|
// aTargetScope can be:
|
|
|
|
// - the system-principal scope when we want to dispatch the ConsoleEvent to
|
|
|
|
// nsIConsoleAPIStorage (See the comment in Console.cpp about the use of
|
|
|
|
// xpc::PrivilegedJunkScope()
|
|
|
|
// - the mConsoleEventNotifier->Callable() scope when we want to notify this
|
|
|
|
// handler about a new ConsoleEvent.
|
|
|
|
// - It can be the global from the JSContext when RetrieveConsoleEvents is
|
|
|
|
// called.
|
2016-03-23 21:55:07 +00:00
|
|
|
bool
|
2016-03-24 08:29:08 +00:00
|
|
|
PopulateConsoleNotificationInTheTargetScope(JSContext* aCx,
|
|
|
|
const Sequence<JS::Value>& aArguments,
|
|
|
|
JSObject* aTargetScope,
|
|
|
|
JS::MutableHandle<JS::Value> aValue,
|
|
|
|
ConsoleCallData* aData) const;
|
2016-03-23 21:55:07 +00:00
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
// If the first JS::Value of the array is a string, this method uses it to
|
|
|
|
// format a string. The supported sequences are:
|
|
|
|
// %s - string
|
|
|
|
// %d,%i - integer
|
|
|
|
// %f - double
|
2014-04-10 14:59:21 +00:00
|
|
|
// %o,%O - a JS object.
|
|
|
|
// %c - style string.
|
2014-02-27 23:39:00 +00:00
|
|
|
// The output is an array where any object is a separated item, the rest is
|
|
|
|
// unified in a format string.
|
|
|
|
// Example if the input is:
|
|
|
|
// "string: %s, integer: %d, object: %o, double: %d", 's', 1, window, 0.9
|
|
|
|
// The output will be:
|
|
|
|
// [ "string: s, integer: 1, object: ", window, ", double: 0.9" ]
|
2014-04-10 14:59:21 +00:00
|
|
|
//
|
|
|
|
// The aStyles array is populated with the style strings that the function
|
|
|
|
// finds based the format string. The index of the styles matches the indexes
|
|
|
|
// of elements that need the custom styling from aSequence. For elements with
|
|
|
|
// no custom styling the array is padded with null elements.
|
2015-05-25 11:50:15 +00:00
|
|
|
bool
|
2016-02-07 10:29:12 +00:00
|
|
|
ProcessArguments(JSContext* aCx, const Sequence<JS::Value>& aData,
|
2014-04-10 14:59:21 +00:00
|
|
|
Sequence<JS::Value>& aSequence,
|
2016-02-13 16:08:17 +00:00
|
|
|
Sequence<nsString>& aStyles) const;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2014-02-27 23:39:12 +00:00
|
|
|
void
|
|
|
|
MakeFormatString(nsCString& aFormat, int32_t aInteger, int32_t aMantissa,
|
2016-02-07 10:29:12 +00:00
|
|
|
char aCh) const;
|
2014-02-27 23:39:12 +00:00
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
// Stringify and Concat all the JS::Value in a single string using ' ' as
|
|
|
|
// separator.
|
|
|
|
void
|
2016-02-07 10:29:12 +00:00
|
|
|
ComposeGroupName(JSContext* aCx, const Sequence<JS::Value>& aData,
|
|
|
|
nsAString& aName) const;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-02-11 17:09:22 +00:00
|
|
|
// StartTimer is called on the owning thread and populates aTimerLabel and
|
|
|
|
// aTimerValue. It returns false if a JS exception is thrown or if
|
|
|
|
// the max number of timers is reached.
|
|
|
|
// * aCx - the JSContext rooting aName.
|
|
|
|
// * aName - this is (should be) the name of the timer as JS::Value.
|
|
|
|
// * aTimestamp - the monotonicTimer for this context (taken from
|
|
|
|
// window->performance.now() or from Now() -
|
|
|
|
// workerPrivate->NowBaseTimeStamp() in workers.
|
|
|
|
// * aTimerLabel - This label will be populated with the aName converted to a
|
|
|
|
// string.
|
|
|
|
// * aTimerValue - the StartTimer value stored into (or taken from)
|
|
|
|
// mTimerRegistry.
|
|
|
|
bool
|
2014-02-27 23:39:00 +00:00
|
|
|
StartTimer(JSContext* aCx, const JS::Value& aName,
|
2016-02-11 17:09:22 +00:00
|
|
|
DOMHighResTimeStamp aTimestamp,
|
|
|
|
nsAString& aTimerLabel,
|
|
|
|
DOMHighResTimeStamp* aTimerValue);
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
// CreateStartTimerValue generates a ConsoleTimerStart dictionary exposed as
|
|
|
|
// JS::Value. If aTimerStatus is false, it generates a ConsoleTimerError
|
|
|
|
// instead. It's called only after the execution StartTimer on the owning
|
|
|
|
// thread.
|
2016-02-11 17:09:22 +00:00
|
|
|
// * aCx - this is the context that will root the returned value.
|
|
|
|
// * aTimerLabel - this label must be what StartTimer received as aTimerLabel.
|
|
|
|
// * aTimerValue - this is what StartTimer received as aTimerValue
|
|
|
|
// * aTimerStatus - the return value of StartTimer.
|
2014-02-27 23:39:00 +00:00
|
|
|
JS::Value
|
2016-02-11 17:09:22 +00:00
|
|
|
CreateStartTimerValue(JSContext* aCx, const nsAString& aTimerLabel,
|
|
|
|
DOMHighResTimeStamp aTimerValue,
|
|
|
|
bool aTimerStatus) const;
|
|
|
|
|
|
|
|
// StopTimer follows the same pattern as StartTimer: it runs on the
|
|
|
|
// owning thread and populates aTimerLabel and aTimerDuration, used by
|
2016-03-23 21:55:07 +00:00
|
|
|
// CreateStopTimerValue. It returns false if a JS exception is thrown or if
|
|
|
|
// the aName timer doesn't exist in the mTimerRegistry.
|
2016-02-11 17:09:22 +00:00
|
|
|
// * aCx - the JSContext rooting aName.
|
|
|
|
// * aName - this is (should be) the name of the timer as JS::Value.
|
|
|
|
// * aTimestamp - the monotonicTimer for this context (taken from
|
|
|
|
// window->performance.now() or from Now() -
|
|
|
|
// workerPrivate->NowBaseTimeStamp() in workers.
|
|
|
|
// * aTimerLabel - This label will be populated with the aName converted to a
|
|
|
|
// string.
|
|
|
|
// * aTimerDuration - the difference between aTimestamp and when the timer
|
|
|
|
// started (see StartTimer).
|
|
|
|
bool
|
2014-02-27 23:39:00 +00:00
|
|
|
StopTimer(JSContext* aCx, const JS::Value& aName,
|
2016-02-11 17:09:22 +00:00
|
|
|
DOMHighResTimeStamp aTimestamp,
|
|
|
|
nsAString& aTimerLabel,
|
|
|
|
double* aTimerDuration);
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
// This method generates a ConsoleTimerEnd dictionary exposed as JS::Value, or
|
|
|
|
// a ConsoleTimerError dictionary if aTimerStatus is false. See StopTimer.
|
2016-02-11 17:09:22 +00:00
|
|
|
// * aCx - this is the context that will root the returned value.
|
|
|
|
// * aTimerLabel - this label must be what StopTimer received as aTimerLabel.
|
|
|
|
// * aTimerDuration - this is what StopTimer received as aTimerDuration
|
|
|
|
// * aTimerStatus - the return value of StopTimer.
|
|
|
|
JS::Value
|
|
|
|
CreateStopTimerValue(JSContext* aCx, const nsAString& aTimerLabel,
|
|
|
|
double aTimerDuration,
|
|
|
|
bool aTimerStatus) const;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
// The method populates a Sequence from an array of JS::Value.
|
2015-05-25 11:50:15 +00:00
|
|
|
bool
|
2016-02-07 10:29:12 +00:00
|
|
|
ArgumentsToValueList(const Sequence<JS::Value>& aData,
|
|
|
|
Sequence<JS::Value>& aSequence) const;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
ProfileMethod(JSContext* aCx, const nsAString& aAction,
|
2014-04-29 06:49:57 +00:00
|
|
|
const Sequence<JS::Value>& aData);
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-02-11 17:09:22 +00:00
|
|
|
// This method follows the same pattern as StartTimer: its runs on the owning
|
2016-03-23 21:55:07 +00:00
|
|
|
// thread and populate aCountLabel, used by CreateCounterValue. Returns
|
|
|
|
// MAX_PAGE_COUNTERS in case of error, otherwise the incremented counter
|
|
|
|
// value.
|
2016-02-11 17:09:22 +00:00
|
|
|
// * aCx - the JSContext rooting aData.
|
|
|
|
// * aFrame - the first frame of ConsoleCallData.
|
|
|
|
// * aData - the arguments received by the console.count() method.
|
|
|
|
// * aCountLabel - the label that will be populated by this method.
|
|
|
|
uint32_t
|
2014-02-27 23:39:24 +00:00
|
|
|
IncreaseCounter(JSContext* aCx, const ConsoleStackEntry& aFrame,
|
2016-02-11 17:09:22 +00:00
|
|
|
const Sequence<JS::Value>& aData,
|
|
|
|
nsAString& aCountLabel);
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
// This method generates a ConsoleCounter dictionary as JS::Value. If
|
|
|
|
// aCountValue is == MAX_PAGE_COUNTERS it generates a ConsoleCounterError
|
|
|
|
// instead. See IncreaseCounter.
|
2016-02-11 17:09:22 +00:00
|
|
|
// * aCx - this is the context that will root the returned value.
|
|
|
|
// * aCountLabel - this label must be what IncreaseCounter received as
|
|
|
|
// aTimerLabel.
|
|
|
|
// * aCountValue - the return value of IncreaseCounter.
|
|
|
|
JS::Value
|
|
|
|
CreateCounterValue(JSContext* aCx, const nsAString& aCountLabel,
|
|
|
|
uint32_t aCountValue) const;
|
2014-02-27 23:39:24 +00:00
|
|
|
|
2014-04-10 20:02:37 +00:00
|
|
|
bool
|
2016-02-07 10:29:12 +00:00
|
|
|
ShouldIncludeStackTrace(MethodName aMethodName) const;
|
2014-04-10 20:02:37 +00:00
|
|
|
|
2015-07-21 18:31:44 +00:00
|
|
|
JSObject*
|
2015-01-06 15:45:00 +00:00
|
|
|
GetOrCreateSandbox(JSContext* aCx, nsIPrincipal* aPrincipal);
|
|
|
|
|
2016-02-11 17:11:02 +00:00
|
|
|
void
|
|
|
|
AssertIsOnOwningThread() const;
|
|
|
|
|
2016-02-11 17:09:22 +00:00
|
|
|
// All these nsCOMPtr are touched on main thread only.
|
2016-01-30 17:05:36 +00:00
|
|
|
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
2014-02-27 23:39:00 +00:00
|
|
|
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<JSObjectHolder> mSandbox;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-02-11 17:09:22 +00:00
|
|
|
// Touched on the owner thread.
|
2014-02-27 23:39:00 +00:00
|
|
|
nsDataHashtable<nsStringHashKey, DOMHighResTimeStamp> mTimerRegistry;
|
2014-02-27 23:39:24 +00:00
|
|
|
nsDataHashtable<nsStringHashKey, uint32_t> mCounterRegistry;
|
2014-02-27 23:39:00 +00:00
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
nsTArray<RefPtr<ConsoleCallData>> mCallDataStorage;
|
|
|
|
|
|
|
|
// This array is used in a particular corner-case where:
|
|
|
|
// 1. we are in a worker thread
|
|
|
|
// 2. we have more than STORAGE_MAX_EVENTS
|
|
|
|
// 3. but the main-thread ConsoleCallDataRunnable of the first one is still
|
|
|
|
// running (this means that something very bad is happening on the
|
|
|
|
// main-thread).
|
|
|
|
// When this happens we want to keep the ConsoleCallData alive for traceing
|
|
|
|
// its JSValues also if 'officially' this ConsoleCallData must be removed from
|
|
|
|
// the storage.
|
|
|
|
nsTArray<RefPtr<ConsoleCallData>> mCallDataStoragePending;
|
2016-02-07 10:29:12 +00:00
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
RefPtr<AnyCallback> mConsoleEventNotifier;
|
|
|
|
|
2016-02-11 17:11:02 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
PRThread* mOwningThread;
|
|
|
|
#endif
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
uint64_t mOuterID;
|
|
|
|
uint64_t mInnerID;
|
|
|
|
|
2016-03-23 21:55:07 +00:00
|
|
|
enum {
|
|
|
|
eUnknown,
|
|
|
|
eInitialized,
|
|
|
|
eShuttingDown
|
|
|
|
} mStatus;
|
|
|
|
|
2014-02-27 23:39:00 +00:00
|
|
|
friend class ConsoleCallData;
|
2015-01-06 15:45:00 +00:00
|
|
|
friend class ConsoleRunnable;
|
2014-02-27 23:39:30 +00:00
|
|
|
friend class ConsoleCallDataRunnable;
|
|
|
|
friend class ConsoleProfileRunnable;
|
2014-02-27 23:39:00 +00:00
|
|
|
};
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-02-27 23:39:00 +00:00
|
|
|
|
|
|
|
#endif /* mozilla_dom_Console_h */
|