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

Issue 1260003003: Move Service Worker %2f validation logic from browser into Blink (2) (Closed)

Created:
5 years, 4 months ago by jeremyarcher
Modified:
5 years, 4 months ago
Reviewers:
falken, tkent, nhiroki
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, falken, kinuko+serviceworker, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move Service Worker %2f validation logic from browser into Blink (2) Adding this feature allows the navigator.serviceWorker.register() function immediately reject with a TypeError when the scope or scriptURL appears to be invalid (see bug for spec details). 1. (Chromium) https://codereview.chromium.org/1259213002 2. (Blink) This CL. 3. (Chromium) https://codereview.chromium.org/1256833004/ BUG=513622 R=nhiroki,falken Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200231

Patch Set 1 #

Total comments: 3

Patch Set 2 : More validation back into Blink. #

Total comments: 2

Patch Set 3 : Fix compile error (!) in original patch. #

Total comments: 1

Patch Set 4 : Add { return false; } #

Patch Set 5 : Add prefix error label before failure message. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -4 lines) Patch
M LayoutTests/http/tests/serviceworker/registration.html View 1 2 chunks +22 lines, -4 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 2 3 4 2 chunks +7 lines, -0 lines 3 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp View 1 2 chunks +10 lines, -0 lines 0 comments Download
M public/platform/WebServiceWorkerProvider.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 28 (6 generated)
jeremyarcher
5 years, 4 months ago (2015-07-28 04:58:30 UTC) #1
nhiroki
https://codereview.chromium.org/1260003003/diff/1/LayoutTests/http/tests/serviceworker/registration.html File LayoutTests/http/tests/serviceworker/registration.html (right): https://codereview.chromium.org/1260003003/diff/1/LayoutTests/http/tests/serviceworker/registration.html#newcode261 LayoutTests/http/tests/serviceworker/registration.html:261: It'd be good to have tests for capital letter ...
5 years, 4 months ago (2015-07-28 07:04:36 UTC) #2
jeremyarcher
On 2015/07/28 07:04:36, nhiroki wrote: > https://codereview.chromium.org/1260003003/diff/1/LayoutTests/http/tests/serviceworker/registration.html > File LayoutTests/http/tests/serviceworker/registration.html (right): > > https://codereview.chromium.org/1260003003/diff/1/LayoutTests/http/tests/serviceworker/registration.html#newcode261 > ...
5 years, 4 months ago (2015-07-31 07:06:18 UTC) #3
nhiroki
Looks good. Nits only. https://codereview.chromium.org/1260003003/diff/20001/LayoutTests/http/tests/serviceworker/registration.html File LayoutTests/http/tests/serviceworker/registration.html (right): https://codereview.chromium.org/1260003003/diff/20001/LayoutTests/http/tests/serviceworker/registration.html#newcode231 LayoutTests/http/tests/serviceworker/registration.html:231: new TypeError, Just passing a ...
5 years, 4 months ago (2015-07-31 07:43:31 UTC) #4
jeremyarcher
On 2015/07/31 07:43:31, nhiroki wrote: > Looks good. Nits only. > > https://codereview.chromium.org/1260003003/diff/20001/LayoutTests/http/tests/serviceworker/registration.html > File ...
5 years, 4 months ago (2015-07-31 08:10:13 UTC) #5
nhiroki
On 2015/07/31 08:10:13, jeremyarcher wrote: > On 2015/07/31 07:43:31, nhiroki wrote: > > Looks good. ...
5 years, 4 months ago (2015-07-31 08:46:41 UTC) #6
nhiroki
https://codereview.chromium.org/1260003003/diff/40001/public/platform/WebServiceWorkerProvider.h File public/platform/WebServiceWorkerProvider.h (right): https://codereview.chromium.org/1260003003/diff/40001/public/platform/WebServiceWorkerProvider.h#newcode65 public/platform/WebServiceWorkerProvider.h:65: virtual bool validateScopeAndScriptURL(const WebURL& scope, const WebURL& scriptURL, WebString* ...
5 years, 4 months ago (2015-07-31 08:47:32 UTC) #7
jeremyarcher
On 2015/07/31 08:47:32, nhiroki wrote: > https://codereview.chromium.org/1260003003/diff/40001/public/platform/WebServiceWorkerProvider.h > File public/platform/WebServiceWorkerProvider.h (right): > > https://codereview.chromium.org/1260003003/diff/40001/public/platform/WebServiceWorkerProvider.h#newcode65 > ...
5 years, 4 months ago (2015-08-03 03:18:54 UTC) #8
jeremyarcher
On 2015/08/03 03:18:54, jeremyarcher wrote: > On 2015/07/31 08:47:32, nhiroki wrote: > > > https://codereview.chromium.org/1260003003/diff/40001/public/platform/WebServiceWorkerProvider.h ...
5 years, 4 months ago (2015-08-05 03:57:39 UTC) #9
nhiroki
lgtm
5 years, 4 months ago (2015-08-05 06:32:10 UTC) #10
falken
https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode251 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:251: if (!m_provider->validateScopeAndScriptURL(patternURL, scriptURL, &webErrorMessage)) { Ah it's kind of ...
5 years, 4 months ago (2015-08-05 06:54:23 UTC) #11
falken
nit on cl description: navigator.serviceWorker.register() isn't an IPC, it's just a javascript function.
5 years, 4 months ago (2015-08-05 06:56:48 UTC) #12
nhiroki
https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode251 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:251: if (!m_provider->validateScopeAndScriptURL(patternURL, scriptURL, &webErrorMessage)) { On 2015/08/05 06:54:23, falken ...
5 years, 4 months ago (2015-08-05 07:15:09 UTC) #13
nhiroki
https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/1260003003/diff/80001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode251 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:251: if (!m_provider->validateScopeAndScriptURL(patternURL, scriptURL, &webErrorMessage)) { On 2015/08/05 07:15:09, nhiroki ...
5 years, 4 months ago (2015-08-05 07:31:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1260003003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1260003003/80001
5 years, 4 months ago (2015-08-07 05:41:40 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/39288)
5 years, 4 months ago (2015-08-07 05:46:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1260003003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1260003003/80001
5 years, 4 months ago (2015-08-07 05:59:38 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/39290)
5 years, 4 months ago (2015-08-07 06:04:33 UTC) #22
jeremyarcher
Er, oops. +tkent@chromium.org
5 years, 4 months ago (2015-08-10 01:59:48 UTC) #24
tkent
lgtm
5 years, 4 months ago (2015-08-10 02:03:02 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1260003003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1260003003/80001
5 years, 4 months ago (2015-08-10 02:03:25 UTC) #27
commit-bot: I haz the power
5 years, 4 months ago (2015-08-10 03:25:09 UTC) #28
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200231

Powered by Google App Engine
This is Rietveld 408576698