Commit 477bc781 by Jamie Madill

Fix crash on multiple calls to ShInitialize().

The previous fix would allow the calling app to trigger an ASSERT if it did not first call ShFinalize. Chrome would do this in some cases, causing a test failure. BUG=344043 Change-Id: I33fa0c4668dac8750ca949febc7f02cc7d3d95e7 Reviewed-on: https://chromium-review.googlesource.com/187849Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 1d1c1152
......@@ -51,7 +51,10 @@ static bool checkMappedNameMaxLength(const ShHandle handle, size_t expectedValue
//
int ShInitialize()
{
isInitialized = InitProcess();
if (!isInitialized)
{
isInitialized = InitProcess();
}
return isInitialized ? 1 : 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment