Reviewers: kinuko, Justin Novosad, Stephen Chennney
CL:
https://codereview.chromium.org/2171563002/Message:
kin...@chromium.org: Please review changes in Source/core/workers/
ju...@chromium.org: Please review changes in modules/offscreencanvas2d/ and the
two layout tests
sche...@chromium.org: Please review changes in Source/web/.
Thanks!
Description:
Add WorkerSettings to WorkerClients to expose certain flag values in
WorkerGlobalScope
Currently, Settings() can only be accessed from main thread. So I introduce
WorkerSettings to WorkerClients, such that when WorkerGlobalScope is started,
certain flag values can be passed on to be exposed in worker.
Right now, there is only one flag disableReadingFromCanvas in WorkerSettings (
OffscreenCanvas requires access to the value of flag disableReadingFromCanvas in
order to determine the value of originClean(), regardless of being on main or
worker thread); but it will be convenient for other developers who want to add
more.
BUG=607575
Base URL:
https://chromium.googlesource.com/chromium/src.git@masterAffected files (+212, -4 lines):
A third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-read-blocked-by-setting.html
A third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-worker-read-blocked-by-setting.html
M third_party/WebKit/Source/core/core.gypi
A third_party/WebKit/Source/core/workers/WorkerSettings.h
A third_party/WebKit/Source/core/workers/WorkerSettings.cpp
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
M third_party/WebKit/Source/web/DedicatedWorkerGlobalScopeProxyProviderImpl.cpp
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp