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

Issue 27278002: Add an Error class for ServiceWorkers (Closed)

Created:
7 years, 2 months ago by alecflett
Modified:
7 years, 1 month ago
CC:
blink-reviews, jamesr, dglazkov+blink
Visibility:
Public.

Description

Add an Error class for ServiceWorkers This class could eventually be generically exposed as WebError, and wrap DOMError. BUG=285976 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161275

Patch Set 1 #

Total comments: 7

Patch Set 2 : enum for error type, document ownership #

Total comments: 4

Patch Set 3 : Now using struct (but still a pointer) #

Total comments: 1

Patch Set 4 : Fix string threadsafety, ownership model #

Total comments: 3

Patch Set 5 : Address review comments #

Patch Set 6 : Address review comments #

Patch Set 7 : Address review comments #

Patch Set 8 : Don't derive from DOMError #

Patch Set 9 : Add LayoutTest, fix bugs, don't derive from DOMError #

Patch Set 10 : Address review nits #

Total comments: 10

Patch Set 11 : Use virtual test suites to test enabled/disabled #

Patch Set 12 : Add NeedsManualRebaseline #

Patch Set 13 : Update to ToT #

Patch Set 14 : Fix windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -60 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/registration.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +48 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/registration-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -3 lines 0 comments Download
A + LayoutTests/virtual/serviceworker/http/tests/serviceworker/registration-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -3 lines 0 comments Download
M Source/bindings/v8/CallbackPromiseAdapter.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/NavigatorServiceWorker.cpp View 1 2 3 4 5 6 7 8 4 chunks +24 lines, -20 lines 0 comments Download
A + Source/modules/serviceworkers/ServiceWorkerError.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -21 lines 0 comments Download
A + Source/modules/serviceworkers/ServiceWorkerError.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -2 lines 0 comments Download
M Tools/Scripts/webkitpy/layout_tests/port/base.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
A + public/platform/WebServiceWorkerError.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -9 lines 0 comments Download
M public/platform/WebServiceWorkerProvider.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 41 (0 generated)
alecflett
Here were move the 2nd parameter to the CallbackPromiseAdapter to be an error message, which ...
7 years, 2 months ago (2013-10-15 00:23:19 UTC) #1
michaeln
https://codereview.chromium.org/27278002/diff/1/Source/modules/serviceworkers/ServiceWorkerError.h File Source/modules/serviceworkers/ServiceWorkerError.h (right): https://codereview.chromium.org/27278002/diff/1/Source/modules/serviceworkers/ServiceWorkerError.h#newcode48 Source/modules/serviceworkers/ServiceWorkerError.h:48: static PassRefPtr<DOMError> from(WebType* worker) looks like this should be ...
7 years, 2 months ago (2013-10-15 01:28:47 UTC) #2
kinuko
https://codereview.chromium.org/27278002/diff/1/Source/modules/serviceworkers/ServiceWorkerError.h File Source/modules/serviceworkers/ServiceWorkerError.h (right): https://codereview.chromium.org/27278002/diff/1/Source/modules/serviceworkers/ServiceWorkerError.h#newcode50 Source/modules/serviceworkers/ServiceWorkerError.h:50: return create(worker->name(), worker->message()); I'm a bit confused; does this ...
7 years, 2 months ago (2013-10-15 01:43:09 UTC) #3
kinuko
https://codereview.chromium.org/27278002/diff/1/public/platform/WebServiceWorkerError.h File public/platform/WebServiceWorkerError.h (right): https://codereview.chromium.org/27278002/diff/1/public/platform/WebServiceWorkerError.h#newcode42 public/platform/WebServiceWorkerError.h:42: virtual const WebString& name() = 0; On 2013/10/15 01:28:48, ...
7 years, 2 months ago (2013-10-15 02:07:17 UTC) #4
alecflett
Yeah I agree with pretty much everything here. Minor notes: I debated the numeric codes, ...
7 years, 2 months ago (2013-10-15 15:47:10 UTC) #5
alecflett
ok new patch is up, PTAL One other minor note: In case it isn't obvious, ...
7 years, 2 months ago (2013-10-15 16:34:01 UTC) #6
kinuko
On 2013/10/15 15:47:10, alecflett wrote: > I don't have a strong preference on ownership which ...
7 years, 2 months ago (2013-10-15 23:00:35 UTC) #7
kinuko
https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp File Source/modules/serviceworkers/ServiceWorkerError.cpp (right): https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp#newcode39 Source/modules/serviceworkers/ServiceWorkerError.cpp:39: DEFINE_STATIC_LOCAL(AtomicString, registrationError, ("RegistrationError", AtomicString::ConstructFromLiteral)); This is not thread safe, ...
7 years, 2 months ago (2013-10-15 23:44:43 UTC) #8
alecflett
So this new patch uses a struct rather than an abstract class, with concrete and ...
7 years, 2 months ago (2013-10-16 00:23:33 UTC) #9
alecflett
ok, issues addressed.
7 years, 2 months ago (2013-10-16 01:09:25 UTC) #10
michaeln
https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp File Source/modules/serviceworkers/ServiceWorkerError.cpp (right): https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp#newcode39 Source/modules/serviceworkers/ServiceWorkerError.cpp:39: DEFINE_STATIC_LOCAL(AtomicString, registrationError, ("RegistrationError", AtomicString::ConstructFromLiteral)); this function looks iffy from ...
7 years, 2 months ago (2013-10-16 01:19:15 UTC) #11
michaeln
On 2013/10/16 01:19:15, michaeln wrote: > https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp > File Source/modules/serviceworkers/ServiceWorkerError.cpp (right): > > https://codereview.chromium.org/27278002/diff/9001/Source/modules/serviceworkers/ServiceWorkerError.cpp#newcode39 > ...
7 years, 2 months ago (2013-10-16 01:24:42 UTC) #12
kinuko
Ok, let me give an earlier lgtm this time https://codereview.chromium.org/27278002/diff/23001/Source/modules/serviceworkers/ServiceWorkerError.h File Source/modules/serviceworkers/ServiceWorkerError.h (right): https://codereview.chromium.org/27278002/diff/23001/Source/modules/serviceworkers/ServiceWorkerError.h#newcode51 Source/modules/serviceworkers/ServiceWorkerError.h:51: ...
7 years, 2 months ago (2013-10-16 01:44:17 UTC) #13
kinuko
more nits.. https://codereview.chromium.org/27278002/diff/23001/public/platform/WebServiceWorkerError.h File public/platform/WebServiceWorkerError.h (right): https://codereview.chromium.org/27278002/diff/23001/public/platform/WebServiceWorkerError.h#newcode40 public/platform/WebServiceWorkerError.h:40: RegistrationError = 0, This looks to be ...
7 years, 2 months ago (2013-10-16 01:46:30 UTC) #14
alecflett
abarth@ - need a quick review for public/platform
7 years, 2 months ago (2013-10-23 21:21:29 UTC) #15
abarth-chromium
Why do you need to subclass DOMError? I don't understand.
7 years, 2 months ago (2013-10-23 21:25:28 UTC) #16
abarth-chromium
Without tests, it's difficult to understand what problem you're solving. Generally, you don't need to ...
7 years, 2 months ago (2013-10-23 21:25:59 UTC) #17
alecflett
On 2013/10/23 21:25:59, abarth wrote: > Without tests, it's difficult to understand what problem you're ...
7 years, 1 month ago (2013-10-24 23:07:44 UTC) #18
alecflett
On 2013/10/24 23:07:44, alecflett wrote: > On 2013/10/23 21:25:59, abarth wrote: > > Without tests, ...
7 years, 1 month ago (2013-10-24 23:08:49 UTC) #19
michaeln
https://codereview.chromium.org/27278002/diff/263001/LayoutTests/http/tests/serviceworker/registration.html File LayoutTests/http/tests/serviceworker/registration.html (right): https://codereview.chromium.org/27278002/diff/263001/LayoutTests/http/tests/serviceworker/registration.html#newcode9 LayoutTests/http/tests/serviceworker/registration.html:9: function test_registerBasics() { I'd suggest we not add this ...
7 years, 1 month ago (2013-10-24 23:26:55 UTC) #20
michaeln
https://codereview.chromium.org/27278002/diff/263001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp File Source/modules/serviceworkers/NavigatorServiceWorker.cpp (right): https://codereview.chromium.org/27278002/diff/263001/Source/modules/serviceworkers/NavigatorServiceWorker.cpp#newcode122 Source/modules/serviceworkers/NavigatorServiceWorker.cpp:122: if (!documentOrigin->canRequest(scriptURL)) { On 2013/10/24 23:26:55, michaeln wrote: > ...
7 years, 1 month ago (2013-10-25 00:45:00 UTC) #21
abarth-chromium
LGTM We can continue to iterate on the security check in future CLs. That issue ...
7 years, 1 month ago (2013-10-25 15:37:15 UTC) #22
michaeln
> We can continue to iterate on the security check in future CLs. That issue ...
7 years, 1 month ago (2013-10-25 21:59:06 UTC) #23
alecflett
Thanks! (I can't land this until https://codereview.chromium.org/25008006/ lands) https://codereview.chromium.org/27278002/diff/263001/Source/modules/serviceworkers/ServiceWorkerError.cpp File Source/modules/serviceworkers/ServiceWorkerError.cpp (right): https://codereview.chromium.org/27278002/diff/263001/Source/modules/serviceworkers/ServiceWorkerError.cpp#newcode34 Source/modules/serviceworkers/ServiceWorkerError.cpp:34: using ...
7 years, 1 month ago (2013-10-25 23:05:32 UTC) #24
abarth-chromium
On 2013/10/25 21:59:06, michaeln wrote: > > There is no such thing as equality comparison ...
7 years, 1 month ago (2013-10-26 15:44:09 UTC) #25
abarth-chromium
On 2013/10/25 23:05:32, alecflett wrote: > Done. (I was actually surprised to see the non-release() ...
7 years, 1 month ago (2013-10-26 15:44:36 UTC) #26
michaeln
> What bad thing are you trying to prevent? Pathological inputs that get written to ...
7 years, 1 month ago (2013-10-28 20:28:36 UTC) #27
alecflett
On 2013/10/28 20:28:36, michaeln wrote: > > What bad thing are you trying to prevent? ...
7 years, 1 month ago (2013-10-28 20:37:28 UTC) #28
michaeln
I'm not sure what security properties alec would like to achieve?
7 years, 1 month ago (2013-10-28 21:02:30 UTC) #29
abarth-chromium
Ok, we should probably talk more in person, likely with a whiteboard. It's only going ...
7 years, 1 month ago (2013-10-29 05:29:07 UTC) #30
kinuko
On 2013/10/29 05:29:07, abarth wrote: > Ok, we should probably talk more in person, likely ...
7 years, 1 month ago (2013-10-29 05:42:52 UTC) #31
abarth-chromium
My guess, by the way, is that you want to SecurityOrigin::createFromURL(urlOfWorker)->canAccess(executionContext()). We just need to ...
7 years, 1 month ago (2013-10-29 05:49:46 UTC) #32
kinuko
On 2013/10/29 05:49:46, abarth wrote: > My guess, by the way, is that you want ...
7 years, 1 month ago (2013-10-29 06:38:32 UTC) #33
alecflett
On 2013/10/29 05:42:52, kinuko wrote: > On 2013/10/29 05:29:07, abarth wrote: > > Ok, we ...
7 years, 1 month ago (2013-10-29 22:05:15 UTC) #34
alecflett
Spun this discussion off here: https://github.com/slightlyoff/ServiceWorker/issues/113
7 years, 1 month ago (2013-10-29 22:09:12 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/27278002/483001
7 years, 1 month ago (2013-10-30 01:58:28 UTC) #36
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-30 03:00:00 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/27278002/713001
7 years, 1 month ago (2013-11-04 19:05:57 UTC) #38
commit-bot: I haz the power
Failed to trigger a try job on win_layout HTTP Error 400: Bad Request
7 years, 1 month ago (2013-11-04 19:11:15 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/27278002/763001
7 years, 1 month ago (2013-11-04 19:11:31 UTC) #40
commit-bot: I haz the power
7 years, 1 month ago (2013-11-04 20:20:31 UTC) #41
Message was sent while issue was closed.
Change committed as 161275

Powered by Google App Engine
This is Rietveld 408576698