fast/canvas-composite-* tests are now flaky assertion failures Seems to have started with https://trac.webkit.org/changeset/204987 Seen with: fast/canvas/canvas-composite-text-alpha.html fast/canvas/canvas-composite-stroke-alpha.html fast/canvas/canvas-composite-transformclip.html fast/canvas/canvas-composite.html fast/canvas/canvas-composite-canvas.html https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcanvas%2Fcanvas-composite ASSERTION FAILED: externalMemorySize() <= extraMemorySize() /Volumes/Data/slave/elcapitan-debug/build/Source/JavaScriptCore/heap/Heap.cpp(1447) : void JSC::Heap::didFinishCollection(double) 1 0x107231430 WTFCrash 2 0x106ac1fd2 JSC::Heap::didFinishCollection(double) 3 0x106ac11a2 JSC::Heap::collectImpl(JSC::HeapOperation, void*, void*, int (&) [37]) 4 0x106ac0aed JSC::Heap::collect(JSC::HeapOperation) 5 0x106a9f16b JSC::FullGCActivityCallback::doCollection() 6 0x106ab0db0 JSC::GCActivityCallback::doWork() 7 0x106adb34e JSC::HeapTimer::timerDidFire(__CFRunLoopTimer*, void*) 8 0x7fff8f40ab94 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 9 0x7fff8f40a823 __CFRunLoopDoTimer 10 0x7fff8f40a37a __CFRunLoopDoTimers 11 0x7fff8f401871 __CFRunLoopRun 12 0x7fff8f400ed8 CFRunLoopRunSpecific 13 0x7fff90d49935 RunCurrentEventLoopInMode 14 0x7fff90d4976f ReceiveNextEventCommon 15 0x7fff90d495af _BlockUntilNextEventMatchingListInModeWithFilter 16 0x7fff95c11df6 _DPSNextEvent 17 0x7fff95c11226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 18 0x7fff95c05d80 -[NSApplication run] 19 0x7fff95bcf368 NSApplicationMain 20 0x7fff9a697194 _xpc_objc_main 21 0x7fff9a695bbe xpc_main 22 0x102993080 main 23 0x7fff87f615ad start LEAK: 23 WebProcessPool LEAK: 23 WebPageProxy
See also: <rdar://problem/27219483>
Ah, I think the fix here is to have HTMLCanvasElement::memoryCost() forward the call to ImageBuffer::memoryCost() instead of doing an estimate. The assertion happens because the external size is bigger than the estimate.
Created attachment 287141 [details] Patch
Comment on attachment 287141 [details] Patch r=me
Comment on attachment 287141 [details] Patch Clearing flags on attachment: 287141 Committed r205053: <http://trac.webkit.org/changeset/205053>
All reviewed patches have been landed. Closing bug.