Histogram logging in OffscreenCanvasFrameDispatcherImpl::dispatchFrame is not thread safe |
||
Issue descriptionThe timer histograms for the cases where we are in a worker are implemented using static variables. When running with assertions enabled, this causes crashes due to thread safety checks. This can be observed when re-loading a page that uses offscreencanvas.commit in a worker. After reloading the page, a new worker is created and the statics end up being accessed on a different thread from where they were initialized. This is most likely also causing flake on the test bots: If two offscreen canvas "in-worker" tests get executed on the same test driver, the second test will crash.
,
Nov 16 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e9ccbda7993554fbdeab8810be5e4ac3ac669f8d commit e9ccbda7993554fbdeab8810be5e4ac3ac669f8d Author: xidachen <xidachen@chromium.org> Date: Wed Nov 16 01:21:04 2016 Make OffscreenCanvas histogram thread safe In OffscreenCanvasFrameDispatcherImpl::dispatchFrame, we have a timer histogram at the end of this function which uses DEFINE_STATIC_LOCAL. This is not thread safe in the cases where multiple worker commit at the same time. This CL makes the timer histogram thread safe. A layout test has been added to make sure that the test doesn't crash. BUG= 663916 Review-Url: https://codereview.chromium.org/2502853003 Cr-Commit-Position: refs/heads/master@{#432333} [add] https://crrev.com/e9ccbda7993554fbdeab8810be5e4ac3ac669f8d/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-multiple-worker-commit.html [modify] https://crrev.com/e9ccbda7993554fbdeab8810be5e4ac3ac669f8d/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
,
Nov 16 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by junov@chromium.org
, Nov 9 2016