diff --git a/ipc/mscom/MainThreadHandoff.cpp b/ipc/mscom/MainThreadHandoff.cpp index 8c0c5086233b..a89c15b8d3b4 100644 --- a/ipc/mscom/MainThreadHandoff.cpp +++ b/ipc/mscom/MainThreadHandoff.cpp @@ -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(reinterpret_cast(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(reinterpret_cast(stackBase) + + paramInfo.stackOffset); } else if (FAILED(hr)) { return hr; } else {