mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1256515 - bail out in CanvasRenderingContext2D::DrawWindow if snapshotting draw target fails. r=bas.schouten a=lizzard
MozReview-Commit-ID: LxQ3v8zqXI
This commit is contained in:
parent
947d33c6bc
commit
96b2096dd3
@ -4953,6 +4953,10 @@ CanvasRenderingContext2D::DrawWindow(nsGlobalWindow& aWindow, double aX,
|
||||
EnsureTarget();
|
||||
if (drawDT) {
|
||||
RefPtr<SourceSurface> snapshot = drawDT->Snapshot();
|
||||
if (NS_WARN_IF(!snapshot)) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
RefPtr<DataSourceSurface> data = snapshot->GetDataSurface();
|
||||
|
||||
DataSourceSurface::MappedSurface rawData;
|
||||
|
Loading…
Reference in New Issue
Block a user