mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 871301 - Remove JS_GetGlobalObject from nsCrypto and nsDirectoryViewer. r=bz
This commit is contained in:
parent
a747313c85
commit
78feb83f6b
@ -1916,7 +1916,7 @@ nsCrypto::GenerateCRMFRequest(nsIDOMCRMFObject** aReturn)
|
||||
JSAutoByteString jsCallback(cx, jsString);
|
||||
NS_ENSURE_TRUE(!!jsCallback, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nrv = xpc->WrapNative(cx, ::JS_GetGlobalObject(cx),
|
||||
nrv = xpc->WrapNative(cx, JS_GetGlobalForScopeChain(cx),
|
||||
static_cast<nsIDOMCrypto *>(this),
|
||||
NS_GET_IID(nsIDOMCrypto), getter_AddRefs(holder));
|
||||
NS_ENSURE_SUCCESS(nrv, nrv);
|
||||
@ -2176,15 +2176,10 @@ NS_IMETHODIMP
|
||||
nsCryptoRunnable::Run()
|
||||
{
|
||||
nsNSSShutDownPreventionLock locker;
|
||||
JSContext *cx = m_args->m_cx;
|
||||
|
||||
AutoPushJSContext cx(m_args->m_cx);
|
||||
JSAutoRequest ar(cx);
|
||||
JSAutoCompartment ac(cx, m_args->m_scope);
|
||||
|
||||
// make sure the right context is on the stack. must not return w/out popping
|
||||
nsCxPusher pusher;
|
||||
pusher.Push(cx);
|
||||
|
||||
JSBool ok =
|
||||
JS_EvaluateScriptForPrincipals(cx, m_args->m_scope,
|
||||
nsJSPrincipals::get(m_args->m_principals),
|
||||
|
@ -160,7 +160,7 @@ nsHTTPIndex::OnFTPControlLog(bool server, const char *msg)
|
||||
AutoPushJSContext cx(context->GetNativeContext());
|
||||
NS_ENSURE_TRUE(cx, NS_OK);
|
||||
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalObject(cx));
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalForScopeChain(cx));
|
||||
NS_ENSURE_TRUE(global, NS_OK);
|
||||
|
||||
JS::Value params[2];
|
||||
@ -236,7 +236,7 @@ nsHTTPIndex::OnStartRequest(nsIRequest *request, nsISupports* aContext)
|
||||
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
|
||||
|
||||
AutoPushJSContext cx(context->GetNativeContext());
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalObject(cx));
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalForScopeChain(cx));
|
||||
|
||||
// Using XPConnect, wrap the HTTP index object...
|
||||
static NS_DEFINE_CID(kXPConnectCID, NS_XPCONNECT_CID);
|
||||
|
Loading…
Reference in New Issue
Block a user