mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1029660 - Remove nsContentUtils::DeferredFinalize. r=peterv
This commit is contained in:
parent
216804a0b7
commit
755e7c59b3
@ -121,16 +121,6 @@ namespace layers {
|
||||
class LayerManager;
|
||||
} // namespace layers
|
||||
|
||||
// Called back from DeferredFinalize. Should add 'thing' to the array of smart
|
||||
// pointers in 'pointers', creating the array if 'pointers' is null, and return
|
||||
// the array.
|
||||
typedef void* (*DeferredFinalizeAppendFunction)(void* pointers, void* thing);
|
||||
|
||||
// Called to finalize a number of objects. Slice is the number of objects
|
||||
// to finalize, or if it's UINT32_MAX, all objects should be finalized.
|
||||
// Return value indicates whether it finalized all objects in the buffer.
|
||||
typedef bool (*DeferredFinalizeFunction)(uint32_t slice, void* data);
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
class nsIBidiKeyboard;
|
||||
@ -1280,11 +1270,6 @@ public:
|
||||
static void DestroyAnonymousContent(nsCOMPtr<nsIContent>* aContent);
|
||||
static void DestroyAnonymousContent(nsCOMPtr<Element>* aElement);
|
||||
|
||||
static void DeferredFinalize(nsISupports* aSupports);
|
||||
static void DeferredFinalize(mozilla::DeferredFinalizeAppendFunction aAppendFunc,
|
||||
mozilla::DeferredFinalizeFunction aFunc,
|
||||
void* aThing);
|
||||
|
||||
/*
|
||||
* Notify when the first XUL menu is opened and when the all XUL menus are
|
||||
* closed. At opening, aInstalling should be TRUE, otherwise, it should be
|
||||
|
@ -6065,22 +6065,6 @@ nsContentUtils::AllocClassMatchingInfo(nsINode* aRootNode,
|
||||
return info;
|
||||
}
|
||||
|
||||
// static
|
||||
void
|
||||
nsContentUtils::DeferredFinalize(nsISupports* aSupports)
|
||||
{
|
||||
cyclecollector::DeferredFinalize(aSupports);
|
||||
}
|
||||
|
||||
// static
|
||||
void
|
||||
nsContentUtils::DeferredFinalize(mozilla::DeferredFinalizeAppendFunction aAppendFunc,
|
||||
mozilla::DeferredFinalizeFunction aFunc,
|
||||
void* aThing)
|
||||
{
|
||||
cyclecollector::DeferredFinalize(aAppendFunc, aFunc, aThing);
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsFocusedContent(const nsIContent* aContent)
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "prprf.h"
|
||||
#include "nsNodeUtils.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsCycleCollector.h"
|
||||
|
||||
// Nasty hack. Maybe we could move some of the classinfo utility methods
|
||||
// (e.g. WrapNative) over to nsContentUtils?
|
||||
@ -73,7 +74,7 @@ XBLFinalize(JSFreeOp *fop, JSObject *obj)
|
||||
{
|
||||
nsXBLDocumentInfo* docInfo =
|
||||
static_cast<nsXBLDocumentInfo*>(::JS_GetPrivate(obj));
|
||||
nsContentUtils::DeferredFinalize(docInfo);
|
||||
cyclecollector::DeferredFinalize(docInfo);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -450,7 +450,7 @@ nsXPCWrappedJS::Unlink()
|
||||
if (mOuter) {
|
||||
XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
|
||||
if (rt->GCIsRunning()) {
|
||||
nsContentUtils::DeferredFinalize(mOuter.forget().take());
|
||||
cyclecollector::DeferredFinalize(mOuter.forget().take());
|
||||
} else {
|
||||
mOuter = nullptr;
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ XPCWrappedNative::Destroy()
|
||||
if (mIdentity) {
|
||||
XPCJSRuntime* rt = GetRuntime();
|
||||
if (rt && rt->GetDoingFinalization()) {
|
||||
nsContentUtils::DeferredFinalize(mIdentity);
|
||||
cyclecollector::DeferredFinalize(mIdentity);
|
||||
mIdentity = nullptr;
|
||||
} else {
|
||||
NS_RELEASE(mIdentity);
|
||||
@ -959,7 +959,7 @@ XPCWrappedNative::FlatJSObjectFinalized()
|
||||
#endif
|
||||
XPCJSRuntime* rt = GetRuntime();
|
||||
if (rt) {
|
||||
nsContentUtils::DeferredFinalize(obj);
|
||||
cyclecollector::DeferredFinalize(obj);
|
||||
} else {
|
||||
obj->Release();
|
||||
}
|
||||
|
@ -18,8 +18,14 @@ namespace mozilla {
|
||||
|
||||
class CycleCollectedJSRuntime;
|
||||
|
||||
// See the comments in nsContentUtils.h for explanations of these functions.
|
||||
// Called back from DeferredFinalize. Should add 'thing' to the array of smart
|
||||
// pointers in 'pointers', creating the array if 'pointers' is null, and return
|
||||
// the array.
|
||||
typedef void* (*DeferredFinalizeAppendFunction)(void* aPointers, void* aThing);
|
||||
|
||||
// Called to finalize a number of objects. Slice is the number of objects
|
||||
// to finalize, or if it's UINT32_MAX, all objects should be finalized.
|
||||
// Return value indicates whether it finalized all objects in the buffer.
|
||||
typedef bool (*DeferredFinalizeFunction)(uint32_t aSlice, void* aData);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user