mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 820170 - Weak ref support for globals. r=bholley
This commit is contained in:
parent
20c0b1c5f6
commit
499a22ed0b
@ -168,6 +168,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScriptContextPrincipal)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
|
||||
|
||||
|
@ -20,12 +20,14 @@
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIGlobalObject.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsInProcessTabChildGlobal : public nsDOMEventTargetHelper,
|
||||
public nsFrameScriptExecutor,
|
||||
public nsIInProcessContentFrameMessageManager,
|
||||
public nsIScriptContextPrincipal,
|
||||
public nsIGlobalObject,
|
||||
public nsSupportsWeakReference,
|
||||
public mozilla::dom::ipc::MessageManagerCallback
|
||||
{
|
||||
public:
|
||||
|
@ -7,11 +7,13 @@
|
||||
|
||||
#include "nsIGlobalObject.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
// This interface is public only because it is used in jsd.
|
||||
// Once jsd is gone this file should be moved back to xpconnect/src.
|
||||
|
||||
class SandboxPrivate : public nsIGlobalObject
|
||||
class SandboxPrivate : public nsIGlobalObject,
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
SandboxPrivate(nsIPrincipal *principal, JSObject *global)
|
||||
|
@ -7,11 +7,13 @@
|
||||
#define BackstagePass_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIGlobalObject.h"
|
||||
|
||||
class BackstagePass : public nsIGlobalObject,
|
||||
public nsIXPCScriptable,
|
||||
public nsIClassInfo
|
||||
public nsIClassInfo,
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -2837,7 +2837,10 @@ nsXPCComponents_Utils::ReportError(const JS::Value &error, JSContext *cx)
|
||||
#include "nsNetUtil.h"
|
||||
const char kScriptSecurityManagerContractID[] = NS_SCRIPTSECURITYMANAGER_CONTRACTID;
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(SandboxPrivate, nsIScriptObjectPrincipal, nsIGlobalObject)
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS3(SandboxPrivate,
|
||||
nsIScriptObjectPrincipal,
|
||||
nsIGlobalObject,
|
||||
nsISupportsWeakReference)
|
||||
|
||||
static JSBool
|
||||
SandboxDump(JSContext *cx, unsigned argc, jsval *vp)
|
||||
|
@ -17,6 +17,7 @@ NS_INTERFACE_MAP_BEGIN(BackstagePass)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIXPCScriptable)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIClassInfo)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXPCScriptable)
|
||||
NS_INTERFACE_MAP_END_THREADSAFE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user