Bug 190894

Summary: InspectorCanvas is not getting cleared properly for OffscreenCanvas
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, cdumez, commit-queue, dino, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hi, joepeck, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix
ews-watchlist: commit-queue-
Archive of layout-test-results from ews113 for mac-sierra
none
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2018-10-24 18:33:44 PDT
InspectorCanvas is not getting cleared properly for OffscreenCanvas

    $ run-webkit-tests http/wpt/offscreen-canvas --release --dump-render-tree --guard-malloc --time-out-ms=10000 --iterations=10 --verbose --exit-after-n-failures=1
    …
    [1/40] http/wpt/offscreen-canvas/getContext-webgl.html passed
    [2/40] http/wpt/offscreen-canvas/offscreencanvas.constructor.html passed
    [3/40] http/wpt/offscreen-canvas/transferToImageBitmap-empty.html passed
    [4/40] http/wpt/offscreen-canvas/transferToImageBitmap-webgl.html failed unexpectedly (DumpRenderTree crashed [pid=10060])
    Exiting early after 1 failures. 4 tests run.

Crash:

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 WebCore::InspectorCanvasAgent::clearCanvasData() + 108
    1 WebCore::InspectorInstrumentation::didCommitLoadImpl(WebCore::InstrumentingAgents&, WebCore::Frame&, WebCore::DocumentLoader*) + 217
    2 WebCore::FrameLoader::dispatchDidCommitLoad(std::optional<WebCore::HasInsecureContent>) + 120
    3 WebCore::FrameLoader::receivedFirstData() + 35
    4 WebCore::DocumentLoader::commitData(char const*, unsigned long) + 2274
Comment 1 Joseph Pecoraro 2018-10-24 18:34:20 PDT
<rdar://problem/45498435>
Comment 2 Joseph Pecoraro 2018-10-24 18:39:32 PDT
Created attachment 353070 [details]
[PATCH] Proposed Fix
Comment 3 Radar WebKit Bug Importer 2018-10-24 18:40:49 PDT
<rdar://problem/45541593>
Comment 4 EWS Watchlist 2018-10-24 19:48:15 PDT
Comment on attachment 353070 [details]
[PATCH] Proposed Fix

Attachment 353070 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/9720095

Number of test failures exceeded the failure limit.
Comment 5 EWS Watchlist 2018-10-24 19:48:16 PDT
Created attachment 353073 [details]
Archive of layout-test-results from ews113 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 6 Joseph Pecoraro 2018-10-24 20:29:08 PDT
Created attachment 353074 [details]
[PATCH] Proposed Fix
Comment 7 Joseph Pecoraro 2018-10-24 20:33:37 PDT
Created attachment 353075 [details]
[PATCH] Proposed Fix

One of the ASSERTs was invalid since a context might never have been created. Retrying without that one assert.
Comment 8 WebKit Commit Bot 2018-10-25 01:35:01 PDT
Comment on attachment 353075 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 353075

Committed r237409: <https://trac.webkit.org/changeset/237409>
Comment 9 WebKit Commit Bot 2018-10-25 01:35:03 PDT
All reviewed patches have been landed.  Closing bug.