mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 479624 - Use JSAutoTempValueRooter instead of nsAutoGCRoot in nsJSContext::CallEventHandler. r=mrbkap, sr=jst
This commit is contained in:
parent
4dbb11d2ec
commit
ca8f9d0b93
@ -1957,13 +1957,15 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
jsval targetVal = JSVAL_VOID;
|
||||
JSAutoTempValueRooter tvr(mContext, 1, &targetVal);
|
||||
|
||||
JSObject* target = nsnull;
|
||||
nsAutoGCRoot root(&target, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = JSObjectFromInterface(aTarget, aScope, &target);
|
||||
nsresult rv = JSObjectFromInterface(aTarget, aScope, &target);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
targetVal = OBJECT_TO_JSVAL(target);
|
||||
|
||||
jsval rval = JSVAL_VOID;
|
||||
|
||||
// This one's a lot easier than EvaluateString because we don't have to
|
||||
|
Loading…
Reference in New Issue
Block a user