Bug 1483772 - Never have mAsyncTask be non-null when we cannot paint. r=nical
In bug 1482415 a special check was added for the case where we fail to allocate a buffer and started an async task. This papered over one crash for another as ClientPaintedLayer also assumes that if there is an async task there is a capture. It'd be best to just null out mAsyncTask and keep those checks as is. Differential Revision: https://phabricator.services.mozilla.com/D3520
This commit is contained in:
@@ -237,12 +237,14 @@ ContentClient::BeginPaint(PaintedLayer* aLayer,
|
||||
<< dest.mBufferRect.Width() << ", "
|
||||
<< dest.mBufferRect.Height();
|
||||
}
|
||||
result.mAsyncTask = nullptr;
|
||||
Clear();
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!newBuffer->Lock(writeMode)) {
|
||||
gfxCriticalNote << "Failed to lock new back buffer.";
|
||||
result.mAsyncTask = nullptr;
|
||||
Clear();
|
||||
return result;
|
||||
}
|
||||
@@ -295,7 +297,7 @@ ContentClient::BeginPaint(PaintedLayer* aLayer,
|
||||
void
|
||||
ContentClient::EndPaint(PaintState& aPaintState, nsTArray<ReadbackProcessor::Update>* aReadbackUpdates)
|
||||
{
|
||||
if (aPaintState.mAsyncTask && mBuffer) {
|
||||
if (aPaintState.mAsyncTask) {
|
||||
aPaintState.mAsyncTask->mCapture = mBuffer->EndCapture();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user