Created attachment 775751 [details] [diff] [review] Don't create zero sized surfaces The problem here was that we're trying to create a surface that is 0 sized. CGImage creation fails (and dumps errors to stdout), and we fail DrawTarget::CreateSourceSurfaceForData. We then fallback to Factory::CreateWrappingDataSurface which creates a SourceSurfaceRawData instead. Then when we try draw with this surface we see that its type is TYPE_DATA, and static_cast it to DataSourceSurfaceCG. We should probably fix that potential for an invalid cast too.
I don't which of bug 893824, bug 900133 or bug 898129 caused it, but inbound has been closed for long enough. https://hg.mozilla.org/integration/mozilla-inbound/rev/5e1009e4b1e1
Reproduced nightly 2013-07-15, Mac OS X 10.7.5. Verified fixed FF 25.0a2 (2013-09-12), 26.0a1 (2013-09-12).