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

Issue 1130113006: ServiceWorker: Introduce ServiceWorkerMessageEvent to replace MessageEvent (3/3). (Closed)

Created:
5 years, 7 months ago by xiang
Modified:
5 years, 5 months ago
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, dglazkov+blink, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, tzik, vivekg_samsung, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

ServiceWorker: Introduce ServiceWorkerMessageEvent to replace MessageEvent (3/3). The message sent from Service Worker to its client will land at navigator.serviceWorker.onmessage. The event type will be a new ServiceWorkerMessageEvent which 'source' attribute could be ServiceWorker or MessagePort. spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#serviceworkermessage-event-section BUG=498596 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198297

Patch Set 1 #

Patch Set 2 : add initEvent tests #

Total comments: 11

Patch Set 3 : remove custom bindings #

Total comments: 14

Patch Set 4 : address #4, #14 #

Total comments: 2

Patch Set 5 : make union type only on stack #

Total comments: 16

Patch Set 6 : address #28, #29 #

Patch Set 7 : rebase #

Patch Set 8 : make more tests pass #

Unified diffs Side-by-side diffs Delta from patch set Stats (+563 lines, -17 lines) Patch
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html View 1 2 3 4 5 1 chunk +136 lines, -0 lines 0 comments Download
A LayoutTests/fast/events/constructors/serviceworker-message-event-constructor-expected.txt View 1 2 3 4 5 1 chunk +112 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/chromium/clients-openwindow.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/chromium/notificationclick-can-focus.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/chromium/notificationclick-can-openwindow.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/chromium/windowclient-focus.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/interfaces.html View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/postmessage-msgport-to-client.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/postmessage-to-client.html View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/http/tests/serviceworker/serviceworker-message-event.html View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
A Source/bindings/modules/v8/custom/V8ServiceWorkerMessageEventCustom.cpp View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
M Source/bindings/modules/v8/custom/custom.gni View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/modules/v8/custom/custom.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 5 chunks +7 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.idl View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A Source/modules/serviceworkers/ServiceWorkerMessageEvent.h View 1 2 3 4 5 1 chunk +64 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp View 1 2 3 4 5 1 chunk +88 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl View 1 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M public/platform/WebServiceWorkerProviderClient.h View 1 2 3 4 5 6 1 chunk +1 line, -6 lines 0 comments Download

Messages

Total messages: 39 (7 generated)
xiang
PTAL, thanks.
5 years, 7 months ago (2015-05-15 06:01:23 UTC) #2
falken
We'll need an Intent to Ship strategy before landing. Code looks reasonable, but I'm worried ...
5 years, 7 months ago (2015-05-18 03:40:23 UTC) #4
haraken
On 2015/05/18 03:40:23, falken wrote: > We'll need an Intent to Ship strategy before landing. ...
5 years, 7 months ago (2015-05-18 03:43:00 UTC) #5
xiang
On 2015/05/18 03:43:00, haraken wrote: > On 2015/05/18 03:40:23, falken wrote: > > We'll need ...
5 years, 7 months ago (2015-05-18 06:07:53 UTC) #6
haraken
On 2015/05/18 06:07:53, xiang wrote: > On 2015/05/18 03:43:00, haraken wrote: > > On 2015/05/18 ...
5 years, 7 months ago (2015-05-18 06:40:23 UTC) #7
haraken
+bashi
5 years, 7 months ago (2015-05-18 06:40:34 UTC) #9
bashi
The reason the CL https://codereview.chromium.org/1139873002/ don't work is that we need to use [InitializedByEventConstructor] extended ...
5 years, 7 months ago (2015-05-18 23:39:11 UTC) #10
falken
On 2015/05/18 23:39:11, bashi1 wrote: > The reason the CL https://codereview.chromium.org/1139873002/ don't work is that ...
5 years, 7 months ago (2015-05-19 01:41:05 UTC) #11
bashi
> If that patch is all that we're waiting for, and would remove the need ...
5 years, 7 months ago (2015-05-20 05:22:16 UTC) #12
xiang
Thanks bashi, seems most of these custom bindings are not needed anymore. I have uploaded ...
5 years, 7 months ago (2015-05-21 05:50:42 UTC) #13
bashi
https://codereview.chromium.org/1130113006/diff/40001/LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html File LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html (right): https://codereview.chromium.org/1130113006/diff/40001/LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html#newcode34 LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html:34: //shouldBe("new ServiceWorkerMessageEvent('eventType', { data: undefined }).data", "undefined"); Per spec, ...
5 years, 7 months ago (2015-05-22 00:23:36 UTC) #14
xiang
Thanks for the review. https://codereview.chromium.org/1130113006/diff/20001/LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html File LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html (right): https://codereview.chromium.org/1130113006/diff/20001/LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html#newcode70 LayoutTests/fast/events/constructors/serviceworker-message-event-constructor.html:70: // FIXME: ServiceWorker object could ...
5 years, 7 months ago (2015-05-25 02:04:25 UTC) #15
bashi
IDL dictionary use LGTM. https://codereview.chromium.org/1130113006/diff/40001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/1130113006/diff/40001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode281 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:281: RefPtr<SerializedScriptValue> value = SerializedScriptValueFactory::instance().createFromWire(message); On ...
5 years, 7 months ago (2015-05-26 00:19:01 UTC) #16
haraken
https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode7 Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl:7: dictionary ServiceWorkerMessageEventInit : EventInit { This is a question ...
5 years, 7 months ago (2015-05-26 00:25:52 UTC) #17
falken
On 2015/05/26 00:25:52, haraken wrote: > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl > File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): > > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode7 > ...
5 years, 7 months ago (2015-05-26 00:50:40 UTC) #18
xiang
On 2015/05/26 00:50:40, falken wrote: > On 2015/05/26 00:25:52, haraken wrote: > > > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl ...
5 years, 7 months ago (2015-05-26 01:43:01 UTC) #19
haraken
On 2015/05/26 01:43:01, xiang wrote: > On 2015/05/26 00:50:40, falken wrote: > > On 2015/05/26 ...
5 years, 7 months ago (2015-05-26 02:00:31 UTC) #20
falken
On 2015/05/26 02:00:31, haraken wrote: > On 2015/05/26 01:43:01, xiang wrote: > > On 2015/05/26 ...
5 years, 6 months ago (2015-05-27 05:09:18 UTC) #21
jungkees
https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode7 Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl:7: dictionary ServiceWorkerMessageEventInit : EventInit { On 2015/05/26 00:25:52, haraken ...
5 years, 6 months ago (2015-05-27 10:51:33 UTC) #23
xiang
On 2015/05/27 10:51:33, jungkees wrote: > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl > File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): > > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode7 > ...
5 years, 6 months ago (2015-05-28 06:21:25 UTC) #24
falken
On 2015/05/28 06:21:25, xiang wrote: > On 2015/05/27 10:51:33, jungkees wrote: > > > https://codereview.chromium.org/1130113006/diff/60001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl ...
5 years, 6 months ago (2015-05-28 06:26:46 UTC) #25
xiang
> > We were a little sloppy in the past, but I think we should ...
5 years, 6 months ago (2015-06-15 02:32:03 UTC) #26
falken
On 2015/06/15 02:32:03, xiang wrote: > > > > We were a little sloppy in ...
5 years, 6 months ago (2015-06-18 11:45:09 UTC) #27
falken
ServiceWorker LGTM. https://codereview.chromium.org/1130113006/diff/80001/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html File LayoutTests/http/tests/serviceworker/serviceworker-message-event.html (right): https://codereview.chromium.org/1130113006/diff/80001/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html#newcode23 LayoutTests/http/tests/serviceworker/serviceworker-message-event.html:23: var e = new ServiceWorkerMessageEvent('evenType', {source: worker}); ...
5 years, 6 months ago (2015-06-25 03:49:35 UTC) #28
haraken
bindings and oilpan LGTM https://codereview.chromium.org/1130113006/diff/80001/Source/bindings/modules/v8/custom/V8ServiceWorkerMessageEventCustom.cpp File Source/bindings/modules/v8/custom/V8ServiceWorkerMessageEventCustom.cpp (right): https://codereview.chromium.org/1130113006/diff/80001/Source/bindings/modules/v8/custom/V8ServiceWorkerMessageEventCustom.cpp#newcode13 Source/bindings/modules/v8/custom/V8ServiceWorkerMessageEventCustom.cpp:13: static v8::Local<v8::Value> cacheState(v8::Isolate* isolate, v8::Local<v8::Object> ...
5 years, 6 months ago (2015-06-25 04:18:49 UTC) #29
xiang
Thanks for the review, CL updated. https://codereview.chromium.org/1130113006/diff/80001/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html File LayoutTests/http/tests/serviceworker/serviceworker-message-event.html (right): https://codereview.chromium.org/1130113006/diff/80001/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html#newcode23 LayoutTests/http/tests/serviceworker/serviceworker-message-event.html:23: var e = ...
5 years, 5 months ago (2015-06-29 02:32:24 UTC) #30
haraken
https://codereview.chromium.org/1130113006/diff/80001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): https://codereview.chromium.org/1130113006/diff/80001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode12 Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl:12: sequence<MessagePort> ports; On 2015/06/29 02:32:24, xiang wrote: > On ...
5 years, 5 months ago (2015-06-29 02:37:14 UTC) #31
xiang
On 2015/06/29 02:37:14, haraken wrote: > https://codereview.chromium.org/1130113006/diff/80001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl > File Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl (right): > > https://codereview.chromium.org/1130113006/diff/80001/Source/modules/serviceworkers/ServiceWorkerMessageEventInit.idl#newcode12 > ...
5 years, 5 months ago (2015-07-01 04:41:53 UTC) #33
Mike West
public/platform LGTM. The layout test failures look real, though. You'll need to rebaseline, I believe.
5 years, 5 months ago (2015-07-01 08:14:13 UTC) #34
Mike West
public/platform LGTM. The layout test failures look real, though. You'll need to rebaseline, I believe.
5 years, 5 months ago (2015-07-01 08:14:13 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1130113006/140001
5 years, 5 months ago (2015-07-06 02:40:25 UTC) #38
commit-bot: I haz the power
5 years, 5 months ago (2015-07-06 04:26:34 UTC) #39
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198297

Powered by Google App Engine
This is Rietveld 408576698