Bug 957742 - Logging for CPOWs (r=mrbkap)

This commit is contained in:
Tom Schuster
2014-05-28 18:05:22 -07:00
parent a21674d44e
commit 14dc944888
7 changed files with 293 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ class ObjectToIdMap
Table *table_;
};
class Logging;
class JavaScriptShared
{
public:
@@ -124,6 +126,13 @@ class JavaScriptShared
}
JSObject *findObjectById(JSContext *cx, uint32_t objId);
static bool LoggingEnabled() { return sLoggingEnabled; }
static bool StackLoggingEnabled() { return sStackLoggingEnabled; }
friend class Logging;
virtual bool isParent() = 0;
protected:
JSRuntime *rt_;
uintptr_t refcount_;
@@ -133,6 +142,10 @@ class JavaScriptShared
ObjectId lastId_;
ObjectToIdMap objectIds_;
static bool sLoggingInitialized;
static bool sLoggingEnabled;
static bool sStackLoggingEnabled;
};
// Use 47 at most, to be safe, since jsval privates are encoded as doubles.