зеркало из https://github.com/mozilla/gecko-dev.git
Bug 902718 - Remove nsIScriptGlobalObjectOwner from XBL. r=bz
This commit is contained in:
Родитель
d3581b6746
Коммит
a7b97b6bc2
|
@ -219,7 +219,7 @@ DocumentInfoHashtableTraverser(nsIURI* key,
|
|||
nsCycleCollectionTraversalCallback *cb =
|
||||
static_cast<nsCycleCollectionTraversalCallback*>(userArg);
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(*cb, "mDocumentTable value");
|
||||
cb->NoteXPCOMChild(static_cast<nsIScriptGlobalObjectOwner*>(di));
|
||||
cb->NoteXPCOMChild(di);
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ XBLFinalize(JSFreeOp *fop, JSObject *obj)
|
|||
{
|
||||
nsXBLDocumentInfo* docInfo =
|
||||
static_cast<nsXBLDocumentInfo*>(::JS_GetPrivate(obj));
|
||||
nsContentUtils::DeferredFinalize(static_cast<nsIScriptGlobalObjectOwner*>(docInfo));
|
||||
nsContentUtils::DeferredFinalize(docInfo);
|
||||
|
||||
nsXBLJSClass* c = static_cast<nsXBLJSClass*>(::JS_GetClass(obj));
|
||||
c->Drop();
|
||||
|
@ -178,8 +178,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsXBLBinding)
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb,
|
||||
"mPrototypeBinding->XBLDocumentInfo()");
|
||||
cb.NoteXPCOMChild(static_cast<nsIScriptGlobalObjectOwner*>(
|
||||
tmp->mPrototypeBinding->XBLDocumentInfo()));
|
||||
cb.NoteXPCOMChild(tmp->mPrototypeBinding->XBLDocumentInfo());
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mContent)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNextBinding)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDefaultInsertionPoint)
|
||||
|
|
|
@ -458,9 +458,8 @@ nsXBLDocumentInfo::MarkInCCGeneration(uint32_t aGeneration)
|
|||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXBLDocumentInfo)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObjectOwner)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptGlobalObjectOwner)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXBLDocumentInfo)
|
||||
|
@ -711,18 +710,6 @@ nsXBLDocumentInfo::EnsureGlobalObject()
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// nsIScriptGlobalObjectOwner methods
|
||||
//
|
||||
|
||||
nsIScriptGlobalObject*
|
||||
nsXBLDocumentInfo::GetScriptGlobalObject()
|
||||
{
|
||||
EnsureGlobalObject();
|
||||
return mGlobalObject;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
AssertInCompilationScope()
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIScriptGlobalObjectOwner.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
@ -17,8 +16,7 @@ class nsXBLPrototypeBinding;
|
|||
class nsObjectHashtable;
|
||||
class nsXBLDocGlobalObject;
|
||||
|
||||
class nsXBLDocumentInfo : public nsIScriptGlobalObjectOwner,
|
||||
public nsSupportsWeakReference
|
||||
class nsXBLDocumentInfo : public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -50,15 +48,11 @@ public:
|
|||
|
||||
JSObject* GetCompilationGlobal();
|
||||
|
||||
// nsIScriptGlobalObjectOwner methods
|
||||
virtual nsIScriptGlobalObject* GetScriptGlobalObject() MOZ_OVERRIDE;
|
||||
|
||||
void MarkInCCGeneration(uint32_t aGeneration);
|
||||
|
||||
static nsresult ReadPrototypeBindings(nsIURI* aURI, nsXBLDocumentInfo** aDocInfo);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsXBLDocumentInfo,
|
||||
nsIScriptGlobalObjectOwner)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsXBLDocumentInfo)
|
||||
|
||||
private:
|
||||
void EnsureGlobalObject();
|
||||
|
|
Загрузка…
Ссылка в новой задаче