зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290951 - Part 2.2: Make CompareManager::ComparisonFinished() public. r=bkelly
This commit is contained in:
Родитель
00d56f9bdb
Коммит
9559405105
|
@ -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()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче