diff --git a/dom/base/RemoteOuterWindowProxy.cpp b/dom/base/RemoteOuterWindowProxy.cpp index 8beadad98ddc..4e6473d4431e 100644 --- a/dom/base/RemoteOuterWindowProxy.cpp +++ b/dom/base/RemoteOuterWindowProxy.cpp @@ -70,7 +70,7 @@ bool GetRemoteOuterWindowProxy(JSContext* aCx, BrowsingContext* aContext, return !!aRetVal; } -static BrowsingContext* GetBrowsingContext(JSObject* aProxy) { +BrowsingContext* GetBrowsingContext(JSObject* aProxy) { MOZ_ASSERT(IsRemoteObjectProxy(aProxy, prototypes::id::Window)); return static_cast( RemoteObjectProxyBase::GetNative(aProxy)); diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index 0c16381263e0..1b17a11c2db7 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -493,7 +493,6 @@ class nsOuterWindowProxy : public MaybeCrossOriginObject { static const nsOuterWindowProxy singleton; - protected: static nsGlobalWindowOuter* GetOuterWindow(JSObject* proxy) { nsGlobalWindowOuter* outerWindow = nsGlobalWindowOuter::FromSupports(static_cast( @@ -501,6 +500,7 @@ class nsOuterWindowProxy : public MaybeCrossOriginObject { return outerWindow; } + protected: // False return value means we threw an exception. True return value // but false "found" means we didn't have a subframe at that index. bool GetSubframeWindow(JSContext* cx, JS::Handle proxy, diff --git a/dom/bindings/RemoteObjectProxy.h b/dom/bindings/RemoteObjectProxy.h index 4b5ac9dd922a..b3782978cc21 100644 --- a/dom/bindings/RemoteObjectProxy.h +++ b/dom/bindings/RemoteObjectProxy.h @@ -15,6 +15,8 @@ namespace mozilla { namespace dom { +class BrowsingContext; + /** * Base class for RemoteObjectProxy. Implements the pieces of the handler that * don't depend on properties/methods of the specific WebIDL interface that this @@ -190,6 +192,12 @@ inline bool IsRemoteObjectProxy(JSObject* aObj) { return RemoteObjectProxyBase::IsRemoteObjectProxy(aObj); } +/** + * Return the browsing context for this remote outer window proxy. + * Only call this function on remote outer window proxies. + */ +BrowsingContext* GetBrowsingContext(JSObject* aProxy); + } // namespace dom } // namespace mozilla