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

Issue 1234603003: CallbackPromiseAdapter types should be more compatible with WebCallbacks (1/3). (Closed)

Created:
5 years, 5 months ago by yhirano
Modified:
5 years, 4 months ago
CC:
blink-reviews, mvanouwerkerk+watch_chromium.org, jsbell+serviceworker_chromium.org, serviceworker-reviews, vivekg_samsung, mlamouri+watch-blink_chromium.org, johnme+watch_chromium.org, tzik, nhiroki, falken, vivekg, dglazkov+blink, scheib+watch_chromium.org, blink-reviews-bindings_chromium.org, michaeln, horo+watch_chromium.org, kinuko+serviceworker, peter+watch_chromium.org, mlamouri (slow - plz ping)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

CallbackPromiseAdapter types should be more compatible with WebCallbacks (1/3). This series of CLs makes CallbackPromiseAdapter (CPA) more compatible with WebCallbacks (WC) in terms of type parameters. Before this CL, CPA<S, T> corresponded to WC<S::WebType*, T::WebType*>. CPAs took ownership of passed pointers but there was no place to represent that in WebCallbacks. This series of CLs changes that: CPA<S, T> correspond to WC<S::WebType, T::WebType>. CPA users can specify if he/she wants the parameter ownership by specifying the type parameter. For example, setting S::WebType to OwnPtr<X> means it takes ownership. Setting S::WebType to |const X&| means it doesn't take ownership. WebCallbacks is exposed to chromium side, so we use WebPassOwnPtr as the counterpart of PassOwnPtr. This CL moves WebTypes from S to OwnPtr<S>. In some cases we will not want to use OwnPtr<S> but I will fix it in the third CL. WebCallbacks.h and CallbackPromiseAdapter.h are not clean in this CL but I will clean it up in the third CL. [1] This CL. [2] https://codereview.chromium.org/1235083006/ [3] https://codereview.chromium.org/1240763002/ BUG=493531 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200156

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 7

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 4

Patch Set 11 : rebase #

Patch Set 12 : #

Patch Set 13 : rebase #

Patch Set 14 : #

Patch Set 15 : test #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : assert_true(false) #

Patch Set 22 : print in setup / teardown #

Patch Set 23 : assert_true(false) before adding #

Patch Set 24 : assert_true(false) at the beginning #

Patch Set 25 : no cache tests #

Patch Set 26 : reject instead of call add #

Patch Set 27 : ScriptPromiseResolver fix? #

Patch Set 28 : -ASSERT #

Patch Set 29 : leak #

Patch Set 30 : leak #

Patch Set 31 : #

Patch Set 32 : #

Patch Set 33 : #

Patch Set 34 : retry! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -141 lines) Patch
M Source/bindings/core/v8/CallbackPromiseAdapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 32 33 10 chunks +62 lines, -62 lines 0 comments Download
M Source/modules/bluetooth/BluetoothDevice.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/bluetooth/BluetoothError.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/bluetooth/BluetoothGATTCharacteristic.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/bluetooth/BluetoothGATTRemoteServer.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/bluetooth/BluetoothGATTService.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/bluetooth/ConvertWebVectorToArrayBuffer.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/cachestorage/Cache.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 chunks +3 lines, -3 lines 0 comments Download
M Source/modules/cachestorage/CacheStorageError.h View 2 chunks +4 lines, -3 lines 0 comments Download
M Source/modules/cachestorage/CacheStorageError.cpp View 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/cachestorage/InspectorCacheStorageAgent.cpp View 1 2 3 4 5 30 31 32 33 2 chunks +4 lines, -2 lines 0 comments Download
M Source/modules/geofencing/Geofencing.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/geofencing/GeofencingError.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/geofencing/GeofencingError.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/presentation/PresentationAvailability.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/presentation/PresentationAvailability.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/presentation/PresentationError.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/presentation/PresentationSession.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/push_messaging/PushError.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/push_messaging/PushError.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerClients.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerError.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerError.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerWindowClient.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M public/platform/WebCallbacks.h View 1 2 3 4 5 31 32 33 1 chunk +74 lines, -12 lines 0 comments Download
M public/platform/WebGeofencingProvider.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M public/platform/WebServiceWorkerCache.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M public/platform/WebServiceWorkerClientsClaimCallbacks.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M public/platform/WebServiceWorkerClientsInfo.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M public/platform/WebServiceWorkerRegistration.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M public/platform/modules/bluetooth/WebBluetooth.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -12 lines 0 comments Download
M public/platform/modules/notifications/WebNotificationManager.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M public/platform/modules/presentation/WebPresentationClient.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M public/platform/modules/push_messaging/WebPushProvider.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 60 (34 generated)
yhirano
5 years, 5 months ago (2015-07-15 05:49:26 UTC) #2
kinuko
Hmm. Looking reasonable, but how to let modules express the intent to pass the ownership ...
5 years, 5 months ago (2015-07-15 06:19:24 UTC) #3
yhirano
https://codereview.chromium.org/1234603003/diff/60001/Source/bindings/core/v8/CallbackPromiseAdapter.h File Source/bindings/core/v8/CallbackPromiseAdapter.h (right): https://codereview.chromium.org/1234603003/diff/60001/Source/bindings/core/v8/CallbackPromiseAdapter.h#newcode42 Source/bindings/core/v8/CallbackPromiseAdapter.h:42: class CallbackPromiseAdapterBase { On 2015/07/15 06:19:23, kinuko wrote: > ...
5 years, 5 months ago (2015-07-15 08:49:45 UTC) #5
yhirano
ping
5 years, 5 months ago (2015-07-21 07:15:33 UTC) #6
kinuko
lgtm https://codereview.chromium.org/1234603003/diff/60001/Source/bindings/core/v8/CallbackPromiseAdapter.h File Source/bindings/core/v8/CallbackPromiseAdapter.h (right): https://codereview.chromium.org/1234603003/diff/60001/Source/bindings/core/v8/CallbackPromiseAdapter.h#newcode42 Source/bindings/core/v8/CallbackPromiseAdapter.h:42: class CallbackPromiseAdapterBase { On 2015/07/15 08:49:45, yhirano wrote: ...
5 years, 5 months ago (2015-07-21 11:27:06 UTC) #7
yhirano
https://codereview.chromium.org/1234603003/diff/120001/Source/bindings/core/v8/CallbackPromiseAdapter.h File Source/bindings/core/v8/CallbackPromiseAdapter.h (right): https://codereview.chromium.org/1234603003/diff/120001/Source/bindings/core/v8/CallbackPromiseAdapter.h#newcode67 Source/bindings/core/v8/CallbackPromiseAdapter.h:67: // TODO(yhirano): Use universal reference and std::forward. On 2015/07/21 ...
5 years, 5 months ago (2015-07-22 11:17:38 UTC) #9
yhirano
5 years, 4 months ago (2015-07-27 12:25:54 UTC) #12
yhirano
PTAL. mlamouri@ for modules/presentation/, modules/app_banner, publc/platform/modules/app_banner, public/platform/modules/presentation. mvanouwerkerk@ for modules/push_messaging, public/platform/modules/push_messaging. scheib@ for public/platform/modules/bluetooth. mek@ ...
5 years, 4 months ago (2015-07-27 12:31:05 UTC) #14
Michael van Ouwerkerk
push_messaging lgtm
5 years, 4 months ago (2015-07-27 12:40:46 UTC) #15
haraken
bindings/ LGTM https://codereview.chromium.org/1234603003/diff/240001/Source/bindings/core/v8/CallbackPromiseAdapter.h File Source/bindings/core/v8/CallbackPromiseAdapter.h (right): https://codereview.chromium.org/1234603003/diff/240001/Source/bindings/core/v8/CallbackPromiseAdapter.h#newcode78 Source/bindings/core/v8/CallbackPromiseAdapter.h:78: // TODO(yhirano): Add comments. Can we add ...
5 years, 4 months ago (2015-07-27 12:48:32 UTC) #16
Peter Beverloo
notifications lgtm Since this is a three-part CL, could you please link to the other ...
5 years, 4 months ago (2015-07-27 12:51:12 UTC) #17
Marijn Kruisselbrink
geofencing LGTM
5 years, 4 months ago (2015-07-27 16:58:12 UTC) #18
scheib
With comments as per haraken and as noted below, LGTM. https://codereview.chromium.org/1234603003/diff/240001/public/platform/modules/bluetooth/WebBluetooth.h File public/platform/modules/bluetooth/WebBluetooth.h (right): https://codereview.chromium.org/1234603003/diff/240001/public/platform/modules/bluetooth/WebBluetooth.h#newcode24 ...
5 years, 4 months ago (2015-07-27 17:35:28 UTC) #19
yhirano
Thanks for the review! > Since this is a three-part CL, could you please link ...
5 years, 4 months ago (2015-07-29 04:01:54 UTC) #24
yhirano
I reverted app_banner related changes because it no longer uses CallbackPromiseAdapter. avavyvod@, can you take ...
5 years, 4 months ago (2015-07-29 04:02:45 UTC) #26
yhirano
On 2015/07/29 04:02:45, yhirano wrote: > I reverted app_banner related changes because it no longer ...
5 years, 4 months ago (2015-08-04 03:36:32 UTC) #27
whywhat
On 2015/08/04 at 03:36:32, yhirano wrote: > On 2015/07/29 04:02:45, yhirano wrote: > > I ...
5 years, 4 months ago (2015-08-05 12:44:54 UTC) #28
yhirano
tkent@, can you take a look at public/ changes?
5 years, 4 months ago (2015-08-06 01:11:50 UTC) #30
tkent
public lgtm
5 years, 4 months ago (2015-08-06 02:09:11 UTC) #31
yhirano
Thank you, all reviewers!
5 years, 4 months ago (2015-08-06 02:11:41 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234603003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1234603003/380001
5 years, 4 months ago (2015-08-06 02:11:59 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/72747)
5 years, 4 months ago (2015-08-06 03:02:09 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234603003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1234603003/380001
5 years, 4 months ago (2015-08-06 04:05:22 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/72758)
5 years, 4 months ago (2015-08-06 05:04:04 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234603003/970001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1234603003/970001
5 years, 4 months ago (2015-08-07 08:39:04 UTC) #59
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 09:34:39 UTC) #60
Message was sent while issue was closed.
Committed patchset #34 (id:970001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200156

Powered by Google App Engine
This is Rietveld 408576698