Bug 951847 - Make the |cx| param to XPCCallContext mandatory. r=gabor

This commit is contained in:
Bobby Holley 2014-01-01 19:23:55 -08:00
parent 43c64baa57
commit c301532969
3 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,7 @@ using namespace JS;
#define IS_TEAROFF_CLASS(clazz) ((clazz) == &XPC_WN_Tearoff_JSClass)
XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage,
JSContext* cx /* = GetDefaultJSContext() */,
JSContext* cx,
HandleObject obj /* = nullptr */,
HandleObject funobj /* = nullptr */,
HandleId name /* = JSID_VOID */,

View File

@ -607,7 +607,8 @@ nsXPCWrappedJS::SystemIsBeingShutDown()
NS_IMETHODIMP
nsXPCWrappedJS::GetEnumerator(nsISimpleEnumerator * *aEnumerate)
{
XPCCallContext ccx(NATIVE_CALLER);
AutoJSContext cx;
XPCCallContext ccx(NATIVE_CALLER, cx);
if (!ccx.IsValid())
return NS_ERROR_UNEXPECTED;
@ -619,7 +620,8 @@ nsXPCWrappedJS::GetEnumerator(nsISimpleEnumerator * *aEnumerate)
NS_IMETHODIMP
nsXPCWrappedJS::GetProperty(const nsAString & name, nsIVariant **_retval)
{
XPCCallContext ccx(NATIVE_CALLER);
AutoJSContext cx;
XPCCallContext ccx(NATIVE_CALLER, cx);
if (!ccx.IsValid())
return NS_ERROR_UNEXPECTED;

View File

@ -801,7 +801,7 @@ public:
static JSContext* GetDefaultJSContext();
XPCCallContext(XPCContext::LangType callerLanguage,
JSContext* cx = GetDefaultJSContext(),
JSContext* cx,
JS::HandleObject obj = JS::NullPtr(),
JS::HandleObject funobj = JS::NullPtr(),
JS::HandleId id = JSID_VOIDHANDLE,