mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1311748: Remove extra pointer dereference from MainThreadHandoff::FixArrayElements; r=jimm
MozReview-Commit-ID: 2hLgQ1km07J --HG-- extra : rebase_source : 371222c8106fd662a4a455117621f22bbc1b3bef
This commit is contained in:
parent
17ee4aac47
commit
a7baaddbf0
@ -256,11 +256,10 @@ MainThreadHandoff::FixArrayElements(ICallFrame* aFrame,
|
||||
return hr;
|
||||
}
|
||||
PVOID stackBase = aFrame->GetStackLocation();
|
||||
// We dereference twice because we need to obtain the value of a parameter
|
||||
// from a stack offset (one), and since that is an outparam, we need to
|
||||
// find the value that is actually being returned (two).
|
||||
arrayPtr = **reinterpret_cast<PVOID**>(reinterpret_cast<PBYTE>(stackBase) +
|
||||
paramInfo.stackOffset);
|
||||
// We dereference because we need to obtain the value of a parameter
|
||||
// from a stack offset. This pointer is the base of the array.
|
||||
arrayPtr = *reinterpret_cast<PVOID*>(reinterpret_cast<PBYTE>(stackBase) +
|
||||
paramInfo.stackOffset);
|
||||
} else if (FAILED(hr)) {
|
||||
return hr;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user