mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 749385 - use deferred release in nsHTMLDocumentSH::ReleaseDocument. r=peterv
This commit is contained in:
parent
be8a13e7a8
commit
499dfe9257
@ -9095,9 +9095,10 @@ nsHTMLDocumentSH::DocumentAllNewResolve(JSContext *cx, JSHandleObject obj, JSHan
|
||||
void
|
||||
nsHTMLDocumentSH::ReleaseDocument(JSFreeOp *fop, JSObject *obj)
|
||||
{
|
||||
nsIHTMLDocument *doc = (nsIHTMLDocument *)::JS_GetPrivate(obj);
|
||||
|
||||
NS_IF_RELEASE(doc);
|
||||
nsIHTMLDocument *doc = static_cast<nsIHTMLDocument *>(JS_GetPrivate(obj));
|
||||
if (doc) {
|
||||
xpc::DeferredRelease(doc);
|
||||
}
|
||||
}
|
||||
|
||||
JSBool
|
||||
|
@ -2128,7 +2128,7 @@ XPCJSRuntime::OnJSContextNew(JSContext *cx)
|
||||
return true;
|
||||
}
|
||||
|
||||
JSBool
|
||||
bool
|
||||
XPCJSRuntime::DeferredRelease(nsISupports* obj)
|
||||
{
|
||||
NS_ASSERTION(obj, "bad param");
|
||||
|
@ -2558,6 +2558,12 @@ nsXPConnect::GetCaller(JSContext **aJSContext, JSObject **aObj)
|
||||
|
||||
namespace xpc {
|
||||
|
||||
bool
|
||||
DeferredRelease(nsISupports *obj)
|
||||
{
|
||||
return nsXPConnect::GetRuntimeInstance()->DeferredRelease(obj);
|
||||
}
|
||||
|
||||
bool
|
||||
Base64Encode(JSContext *cx, JS::Value val, JS::Value *out)
|
||||
{
|
||||
|
@ -698,7 +698,7 @@ public:
|
||||
|
||||
JSBool OnJSContextNew(JSContext* cx);
|
||||
|
||||
JSBool DeferredRelease(nsISupports* obj);
|
||||
bool DeferredRelease(nsISupports* obj);
|
||||
|
||||
JSBool GetDoingFinalization() const {return mDoingFinalization;}
|
||||
|
||||
|
@ -219,6 +219,8 @@ class nsIMemoryMultiReporterCallback;
|
||||
|
||||
namespace xpc {
|
||||
|
||||
bool DeferredRelease(nsISupports *obj);
|
||||
|
||||
// If these functions return false, then an exception will be set on cx.
|
||||
bool Base64Encode(JSContext *cx, JS::Value val, JS::Value *out);
|
||||
bool Base64Decode(JSContext *cx, JS::Value val, JS::Value *out);
|
||||
|
Loading…
Reference in New Issue
Block a user