mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1253362. SVGDocumentWrapper::IsAnimated can be called after SVGDocumentWrapper::DestroyViewer so null check mViewer. r=dholbert
The testcase has an svg-as-image inside an svg-as-image. At shutdown the viewer of the inner svg-as-image is destroyed (via the shutdown observer) first. Then the outer svg-as-image destroys its viewer which tries to unregister all image requests from the refresh driver. So it unregisters the inner svg-as-image, which calls GetAnimated.
This commit is contained in:
parent
df523e9022
commit
4c706e5993
@ -115,6 +115,12 @@ SVGDocumentWrapper::FlushImageTransformInvalidation()
|
||||
bool
|
||||
SVGDocumentWrapper::IsAnimated()
|
||||
{
|
||||
// Can be called for animated images during shutdown, after we've
|
||||
// already Observe()'d XPCOM shutdown and cleared out our mViewer pointer.
|
||||
if (!mViewer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsIDocument* doc = mViewer->GetDocument();
|
||||
if (!doc) {
|
||||
return false;
|
||||
|
11
image/test/crashtests/1253362-1.html
Normal file
11
image/test/crashtests/1253362-1.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="content: url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20style%3D%22background%3A%20url%28data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%253E%253C%252Fsvg%253E%29%22%3E%3C%2Fsvg%3E%0D%0A)"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -21,6 +21,7 @@ load 1242093-1.html
|
||||
load 1242778-1.png
|
||||
load 1249576-1.png
|
||||
load 1251091-1.html
|
||||
load 1253362-1.html
|
||||
load colormap-range.gif
|
||||
HTTP load delayedframe.sjs # A 3-frame animated GIF with an inordinate delay between the second and third frame
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user