mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1589399 - Make BrowsingContext implement nsISupports, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49786 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
68c31e0e43
commit
6f7ced56cb
@ -752,8 +752,20 @@ bool BrowsingContext::ConsumeTransientUserGestureActivation() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(BrowsingContext)
|
||||||
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||||
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||||
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_CLASS(BrowsingContext)
|
NS_IMPL_CYCLE_COLLECTION_CLASS(BrowsingContext)
|
||||||
|
|
||||||
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(BrowsingContext)
|
||||||
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(BrowsingContext)
|
||||||
|
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(BrowsingContext)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(BrowsingContext)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(BrowsingContext)
|
||||||
if (sBrowsingContexts) {
|
if (sBrowsingContexts) {
|
||||||
sBrowsingContexts->Remove(tmp->Id());
|
sBrowsingContexts->Remove(tmp->Id());
|
||||||
@ -782,11 +794,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(BrowsingContext)
|
|||||||
}
|
}
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(BrowsingContext)
|
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(BrowsingContext, AddRef)
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(BrowsingContext, Release)
|
|
||||||
|
|
||||||
class RemoteLocationProxy
|
class RemoteLocationProxy
|
||||||
: public RemoteObjectProxy<BrowsingContext::LocationProxy,
|
: public RemoteObjectProxy<BrowsingContext::LocationProxy,
|
||||||
Location_Binding::sCrossOriginAttributes,
|
Location_Binding::sCrossOriginAttributes,
|
||||||
|
@ -95,7 +95,9 @@ class BrowsingContextBase {
|
|||||||
// Trees of BrowsingContexts should only ever contain nodes of the
|
// Trees of BrowsingContexts should only ever contain nodes of the
|
||||||
// same BrowsingContext::Type. This is enforced by asserts in the
|
// same BrowsingContext::Type. This is enforced by asserts in the
|
||||||
// BrowsingContext::Create* methods.
|
// BrowsingContext::Create* methods.
|
||||||
class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
class BrowsingContext : public nsISupports,
|
||||||
|
public nsWrapperCache,
|
||||||
|
public BrowsingContextBase {
|
||||||
public:
|
public:
|
||||||
enum class Type { Chrome, Content };
|
enum class Type { Chrome, Content };
|
||||||
|
|
||||||
@ -319,8 +321,9 @@ class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
|||||||
Nullable<WindowProxyHolder> GetWindow();
|
Nullable<WindowProxyHolder> GetWindow();
|
||||||
|
|
||||||
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(BrowsingContext)
|
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(BrowsingContext)
|
||||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(BrowsingContext)
|
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(BrowsingContext)
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(BrowsingContext)
|
||||||
|
|
||||||
const Children& GetChildren() { return mChildren; }
|
const Children& GetChildren() { return mChildren; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user