Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Issue 2171563002: Add WorkerSettings to expose certain flag values in WorkerGlobalScope (Closed)

Created:
4 years, 5 months ago by xlai (Olivia)
Modified:
4 years, 4 months ago
CC:
chromium-reviews, falken, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add WorkerSettings to expose certain flag values in WorkerGlobalScope Currently, Settings() can only be accessed from main thread. So I introduce WorkerSettings, 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

Patch Set 1 #

Patch Set 2 : Tried a test #

Patch Set 3 : worker test #

Patch Set 4 : Worker test #

Patch Set 5 : Worker test #

Total comments: 2

Patch Set 6 : Added expected #

Total comments: 9

Patch Set 7 : Modified the worker test #

Patch Set 8 : Nits #

Patch Set 9 : Redo #

Patch Set 10 : Rebase #

Patch Set 11 : Nits #

Patch Set 12 : Fixed error #

Total comments: 4

Patch Set 13 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -12 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-read-blocked-by-setting.html View 1 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-worker-read-blocked-by-setting.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +53 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/workers/WorkerSettings.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/workers/WorkerSettings.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 32 (15 generated)
xlai (Olivia)
kinuko@chromium.org: Please review changes in Source/core/workers/ junov@chromium.org: Please review changes in modules/offscreencanvas2d/ and the two ...
4 years, 5 months ago (2016-07-21 16:46:55 UTC) #4
Justin Novosad
What about WebGL? WebGL does not allow cross origin content, but I assume that it ...
4 years, 5 months ago (2016-07-21 17:27:39 UTC) #5
xlai (Olivia)
But I checked WebGL in offscreencanvas, it doesn't invoke OffscreenCanvas::originClean(). I think those API functions ...
4 years, 5 months ago (2016-07-21 17:56:49 UTC) #6
Justin Novosad
On 2016/07/21 17:56:49, xlai (Olivia) wrote: > But I checked WebGL in offscreencanvas, it doesn't ...
4 years, 5 months ago (2016-07-21 18:06:38 UTC) #7
Justin Novosad
lgtm for LayoutTests and modules/offscreencanvas2d
4 years, 5 months ago (2016-07-21 18:07:46 UTC) #8
Justin Novosad
On 2016/07/21 18:07:46, Justin Novosad wrote: > lgtm for LayoutTests and modules/offscreencanvas2d Bug title should ...
4 years, 5 months ago (2016-07-21 18:14:18 UTC) #9
kinuko
(+nhiroki for worker-related changes) https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp File third_party/WebKit/Source/core/workers/WorkerSettings.cpp (right): https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp#newcode23 third_party/WebKit/Source/core/workers/WorkerSettings.cpp:23: WorkerSettings* WorkerSettings::from(ExecutionContext* context) I'm not ...
4 years, 5 months ago (2016-07-22 09:02:54 UTC) #11
xlai (Olivia)
kinuko@: I replied your comments in-line. https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp File third_party/WebKit/Source/core/workers/WorkerSettings.cpp (right): https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp#newcode23 third_party/WebKit/Source/core/workers/WorkerSettings.cpp:23: WorkerSettings* WorkerSettings::from(ExecutionContext* context) ...
4 years, 5 months ago (2016-07-22 21:53:30 UTC) #12
nhiroki
https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp File third_party/WebKit/Source/core/workers/WorkerSettings.cpp (right): https://codereview.chromium.org/2171563002/diff/100001/third_party/WebKit/Source/core/workers/WorkerSettings.cpp#newcode23 third_party/WebKit/Source/core/workers/WorkerSettings.cpp:23: WorkerSettings* WorkerSettings::from(ExecutionContext* context) On 2016/07/22 21:53:30, xlai (Olivia) wrote: ...
4 years, 5 months ago (2016-07-25 11:14:48 UTC) #13
xlai (Olivia)
As suggested by kinuko@ and nhiroki@, I changed the WorkerSettings so that it becomes a ...
4 years, 5 months ago (2016-07-25 19:17:38 UTC) #14
nhiroki
workers LGTM (you still need owner's stamp) https://codereview.chromium.org/2171563002/diff/210001/third_party/WebKit/Source/core/workers/WorkerSettings.h File third_party/WebKit/Source/core/workers/WorkerSettings.h (right): https://codereview.chromium.org/2171563002/diff/210001/third_party/WebKit/Source/core/workers/WorkerSettings.h#newcode21 third_party/WebKit/Source/core/workers/WorkerSettings.h:21: void copyFlagValuesFromSettings(Settings*); ...
4 years, 5 months ago (2016-07-26 02:30:00 UTC) #16
haraken
owner LGTM
4 years, 4 months ago (2016-07-26 11:39:47 UTC) #17
kinuko
Thanks for making the change! The startup data is getting bigger and a little messier, ...
4 years, 4 months ago (2016-07-26 14:09:20 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2171563002/250001
4 years, 4 months ago (2016-07-26 17:28:13 UTC) #26
xlai (Olivia)
https://codereview.chromium.org/2171563002/diff/210001/third_party/WebKit/Source/core/workers/WorkerSettings.h File third_party/WebKit/Source/core/workers/WorkerSettings.h (right): https://codereview.chromium.org/2171563002/diff/210001/third_party/WebKit/Source/core/workers/WorkerSettings.h#newcode21 third_party/WebKit/Source/core/workers/WorkerSettings.h:21: void copyFlagValuesFromSettings(Settings*); On 2016/07/26 02:30:00, nhiroki (slow) wrote: > ...
4 years, 4 months ago (2016-07-26 17:28:18 UTC) #27
commit-bot: I haz the power
Committed patchset #13 (id:250001)
4 years, 4 months ago (2016-07-26 17:33:11 UTC) #29
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 17:34:48 UTC) #31
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/bcb0806adb80a01830af344ce7d423b1cb864ec3
Cr-Commit-Position: refs/heads/master@{#407842}

Powered by Google App Engine
This is Rietveld 408576698