Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cache synchronization crash with blob images. #3378

Merged
merged 1 commit into from Dec 1, 2018

Commits on Nov 30, 2018

  1. Fix cache synchronization crash with blob images.

    On the first pass of prepare_transaction:
    1) Resource update contains only an AddBlobImage, but it is not visible according to viewport_tiles (set in SetBlobImageVisibleArea)
    2) We call ResourceCache::create_blob_scene_builder_requests but since the image is not visible, it doesn't create any BlobImageParams entries (containing the blob image key) to be stored in txn.blob_requests
    3) Since the transaction has no blob image updates, we can take the shortcut to call RenderBackend::update_document directly
    4) We didn't call ResourceCache::set_blob_rasterizer with the updated txn.blob_rasterizer.
    
    On the second pass of prepare_transaction:
    1) Resource update contains only an SetBlobImageVisibleArea
    2) We don't call ResourceCache::create_blob_scene_builder_requests since there is no Add/UpdateBlobImage entries.
    3) Since the transaction has no blob image updates, we can take the shortcut to call RenderBackend::update_document directly
    4) We are missing the blob we added in the previous step in ResourceCache::request_image, and it adds it to missing_blob_images.
    5) We try to process missing_blob_images in ResourceCache::rasterize_missing_blob_images with the old blob_rasterizer.
    6) Crash.
    
    Potentially fixes bug 1492241.
    aosmond committed Nov 30, 2018
You can’t perform that action at this time.