зеркало из https://github.com/mozilla/gecko-dev.git
Bug 749385 - use deferred release in nsHTMLDocumentSH::ReleaseDocument. r=peterv
This commit is contained in:
Родитель
51db5f5ef1
Коммит
32c90ebc36
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче