Bug 902718 - Remove nsIScriptGlobalObjectOwner from XBL. r=bz

This commit is contained in:
Bobby Holley 2013-08-09 09:25:14 -07:00
Родитель d3581b6746
Коммит a7b97b6bc2
4 изменённых файлов: 6 добавлений и 26 удалений

Просмотреть файл

@ -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();