Bug 1290951 - Part 2.2: Make CompareManager::ComparisonFinished() public. r=bkelly

This commit is contained in:
Ho-Pang Hsu 2017-02-23 18:34:36 +08:00
Родитель 00d56f9bdb
Коммит 9559405105
1 изменённых файлов: 23 добавлений и 23 удалений

Просмотреть файл

@ -351,6 +351,29 @@ public:
return NS_OK;
}
void
ComparisonFinished(nsresult aStatus, bool aIsEqual)
{
AssertIsOnMainThread();
MOZ_ASSERT(mCallback);
MOZ_ASSERT(mState == WaitingForScriptOrComparisonResult);
if (NS_WARN_IF(NS_FAILED(aStatus))) {
Fail(aStatus);
return;
}
if (aIsEqual) {
mCallback->ComparisonResult(aStatus, aIsEqual, EmptyString(), mMaxScope);
Cleanup();
return;
}
// Write to Cache so ScriptLoader reads succeed.
mState = WaitingForOpen;
WriteNetworkBufferToNewCache();
}
private:
~CompareManager()
{
@ -495,29 +518,6 @@ private:
return;
}
void
ComparisonFinished(nsresult aStatus, bool aIsEqual)
{
AssertIsOnMainThread();
MOZ_ASSERT(mCallback);
MOZ_ASSERT(mState == WaitingForScriptOrComparisonResult);
if (NS_WARN_IF(NS_FAILED(aStatus))) {
Fail(aStatus);
return;
}
if (aIsEqual) {
mCallback->ComparisonResult(aStatus, aIsEqual, EmptyString(), mMaxScope);
Cleanup();
return;
}
// Write to Cache so ScriptLoader reads succeed.
mState = WaitingForOpen;
WriteNetworkBufferToNewCache();
}
void
WriteNetworkBufferToNewCache()
{