mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 931912 - Suppress an exact rooting hazard false positive in nsWindowSH::Finalize; r=sfink
This commit is contained in:
parent
ff9279f676
commit
9522dc60ed
@ -3651,6 +3651,14 @@ NS_IMETHODIMP
|
||||
nsWindowSH::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop,
|
||||
JSObject *obj)
|
||||
{
|
||||
// Since this call is virtual, the exact rooting hazard static analysis is
|
||||
// not able to determine that it happens during finalization and should be
|
||||
// ignored. Moreover, the analysis cannot discover and validate the
|
||||
// potential targets of the virtual call to OnFinalize below because of the
|
||||
// indirection through nsCOMMPtr. Thus, we annotate the analysis here so
|
||||
// that it does not report OnFinalize as GCing with |obj| on stack.
|
||||
JS::AutoAssertNoGC nogc;
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryWrappedNative(wrapper));
|
||||
NS_ENSURE_TRUE(sgo, NS_ERROR_UNEXPECTED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user