mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 677079 - Part aa: Expose sizeof(JSContext) in jsfriendapi.h; r=njn
This commit is contained in:
parent
7a241b6e2d
commit
3b70bf2777
@ -607,4 +607,10 @@ GetContextStackLimit(const JSContext *cx)
|
||||
return cx->stackLimit;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(size_t)
|
||||
SizeOfJSContext()
|
||||
{
|
||||
return sizeof(JSContext);
|
||||
}
|
||||
|
||||
} // namespace js
|
||||
|
@ -562,6 +562,9 @@ typedef Vector<JSCompartment*, 0, SystemAllocPolicy> CompartmentVector;
|
||||
extern JS_FRIEND_API(const CompartmentVector&)
|
||||
GetRuntimeCompartments(JSRuntime *rt);
|
||||
|
||||
extern JS_FRIEND_API(size_t)
|
||||
SizeOfJSContext();
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
/*
|
||||
|
@ -69,8 +69,6 @@
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
#include "jscntxt.h" // sizeof(JSContext)
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS7(nsXPConnect,
|
||||
nsIXPConnect,
|
||||
nsISupportsWeakReference,
|
||||
@ -1002,7 +1000,7 @@ public:
|
||||
// edges will ensure that any cycles this context is in won't be
|
||||
// collected.
|
||||
unsigned refCount = nsXPConnect::GetXPConnect()->GetOutstandingRequests(cx) + 1;
|
||||
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(JSContext, refCount)
|
||||
cb.DescribeRefCountedNode(refCount, js::SizeOfJSContext(), "JSContext");
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "[global object]");
|
||||
if (JSObject *global = JS_GetGlobalObject(cx)) {
|
||||
cb.NoteScriptChild(nsIProgrammingLanguage::JAVASCRIPT, global);
|
||||
|
Loading…
Reference in New Issue
Block a user