Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2OagzgagBgAJ
BUG=547716, 442132
Committed: https://crrev.com/b16af0ae12f9d37558e95cb92222c4313df098c0
Cr-Commit-Position: refs/heads/master@{#403191}
+johnme for notifications +bashi/haraken for bindings and the updated Notification::actions implementation +domenic for strict equality ...
4 years, 7 months ago
(2016-05-12 14:54:14 UTC)
#2
+johnme for notifications
+bashi/haraken for bindings and the updated Notification::actions implementation
+domenic for strict equality behaviour
PTAL
Even if we don't technically violate the specification, reference equality
evaluating to false strikes me as unexpected.
Are we OK with this behaviour, or should we find a solution for this first?
(I'll send an Intent to Ship and get API owner approval when we settle on an
answer.)
> to also freeze the individual NotificationAction objects contained therein This is a spec violation ...
4 years, 7 months ago
(2016-05-12 15:53:15 UTC)
#7
> to also freeze the individual NotificationAction objects contained therein
This is a spec violation
> This, according to bashi@, is not actually a violation of the spec:
It is not a violation of the FrozenArray spec, but it is a violation of the
[SameObject] spec:
> [SameObject] readonly attribute FrozenArray<NotificationAction> actions;
I think vibrate should have [SameObject] as well; I will file a spec issue.
Please do not ship with this === behavior, nor with the extra non-spec-compliant
freezing of NotificationAction objects.
domenic
On 2016/05/12 at 15:53:15, domenic wrote: > > to also freeze the individual NotificationAction objects ...
4 years, 7 months ago
(2016-05-12 15:53:50 UTC)
#8
On 2016/05/12 at 15:53:15, domenic wrote:
> > to also freeze the individual NotificationAction objects contained therein
>
> This is a spec violation
I'm sorry, I was wrong on this and did not read the spec closely. It is strange
that the spec freezes these, but I guess it does. My apologies.
The non-[SameObject] behavior is still problematic.
Peter Beverloo
Description was changed from ========== Ship the Notification.action and Notification.vibration properties This CL changes the ...
4 years, 7 months ago
(2016-05-12 17:40:50 UTC)
#9
Description was changed from
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
One potential point of contention is that the strict equality operator
does not work as one might expect. That means that the following two
expressions evaluate to false:
`notification.actions === notification.actions`
`notification.vibrate === notification.vibrate`
This, according to bashi@, is not actually a violation of the spec:
https://codereview.chromium.org/1890733002
BUG=547716, 442132
==========
to
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
BUG=547716, 442132
==========
Peter Beverloo
I have added [SameObject] to both properties by storing them in ScriptValue class-members, but am ...
4 years, 7 months ago
(2016-05-12 17:41:46 UTC)
#10
I have added [SameObject] to both properties by storing them in ScriptValue
class-members, but am not sure whether this is the right thing to do.
bashi, harakan, would you have guidance here? (Notification.cpp/h)
I'll follow-up on the spec side of things in the meantime.
bashi
On 2016/05/12 17:41:46, Peter Beverloo wrote: > I have added [SameObject] to both properties by ...
4 years, 7 months ago
(2016-05-12 23:34:31 UTC)
#11
On 2016/05/12 17:41:46, Peter Beverloo wrote:
> I have added [SameObject] to both properties by storing them in ScriptValue
> class-members, but am not sure whether this is the right thing to do.
>
> bashi, harakan, would you have guidance here? (Notification.cpp/h)
>
> I'll follow-up on the spec side of things in the meantime.
Basically you shouldn't use ScriptValue just for [SameObject], but we haven't
implemented [SameObject] so this would be a workaround.
If you aren't in a rush, it would be better to implement [SameObject] in the
binding layer first. It would take 2-3 days. WDYT?
4 years, 7 months ago
(2016-05-12 23:35:10 UTC)
#13
+yukishiino@
Yuki
On 2016/05/12 23:35:10, bashi1 wrote: > +yukishiino@ Just started to implement [SameObject] at http://crrev.com/1980553002 . ...
4 years, 7 months ago
(2016-05-13 15:23:11 UTC)
#14
On 2016/05/12 23:35:10, bashi1 wrote:
> +yukishiino@
Just started to implement [SameObject] at http://crrev.com/1980553002 .
Will continue to work on this next week.
Peter Beverloo
Fantastic, I rebased on top of your CL yukishiino@! :D Would you mind confirming my ...
4 years, 7 months ago
(2016-05-16 12:47:52 UTC)
#15
Fantastic, I rebased on top of your CL yukishiino@! :D
Would you mind confirming my changes in Notification.cpp? I'll get the spec in
sync and send out an Intent to Ship in the meantime.
Yuki
LGTM. Sorry for having you guys wait for a long time, both FrozenArray and [SameObject]. ...
4 years, 7 months ago
(2016-05-16 13:23:08 UTC)
#16
LGTM. Sorry for having you guys wait for a long time, both FrozenArray and
[SameObject]. My CL will be landed soon.
Yuki
On 2016/05/16 13:23:08, Yuki wrote: > LGTM. Sorry for having you guys wait for a ...
4 years, 7 months ago
(2016-05-17 02:09:47 UTC)
#17
On 2016/05/16 13:23:08, Yuki wrote:
> LGTM. Sorry for having you guys wait for a long time, both FrozenArray and
> [SameObject]. My CL will be landed soon.
Just FYI, my CL http://crrev.com/1980553002 got landed.
bashi
https://codereview.chromium.org/1974033003/diff/60001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1974033003/diff/60001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode334 third_party/WebKit/Source/modules/notifications/Notification.cpp:334: actions[i] = freezeV8Object(toV8(action, scriptState), scriptState->isolate()); Not directly related to ...
4 years, 7 months ago
(2016-05-17 02:42:12 UTC)
#18
https://codereview.chromium.org/1974033003/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/modules/notifications/Notification.cpp (right):
https://codereview.chromium.org/1974033003/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/notifications/Notification.cpp:334: actions[i]
= freezeV8Object(toV8(action, scriptState), scriptState->isolate());
Not directly related to this CL but it seems that the notification spec depends
on ECMAScript. Generally speaking IDL doesn't (and shouldn't) depend on any
specific language so this requirement sounds like a layer violation to me.
We may want to file a bug to WebIDL to add a feature to freeze an object, e.g.
FrozenArray<Frozen<NotificationAction>>.
Just my 2 cents.
Sorry for the revert of my CL. I landed a new support of [SameObject] and ...
4 years, 6 months ago
(2016-05-27 13:10:46 UTC)
#20
Sorry for the revert of my CL. I landed a new support of [SameObject] and
[SaveSameObject] at https://crrev.com/2008823002 .
Could you use [SaveSameObject] in your IDL?
Yuki: Please take another look— done, and tests seem to pass :) +Rick for Web ...
4 years, 5 months ago
(2016-06-29 18:06:09 UTC)
#22
Yuki: Please take another look— done, and tests seem to pass :)
+Rick for Web Exposed tests
Rick Byers
Description was changed from ========== Ship the Notification.action and Notification.vibration properties This CL changes the ...
4 years, 5 months ago
(2016-06-29 18:20:31 UTC)
#23
Description was changed from
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
BUG=547716, 442132
==========
to
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2Oagzgag...
BUG=547716, 442132
==========
Rick Byers
On 2016/06/29 18:06:09, Peter Beverloo wrote: > Yuki: Please take another look— done, and tests ...
4 years, 5 months ago
(2016-06-29 18:24:17 UTC)
#24
On 2016/06/29 18:06:09, Peter Beverloo wrote:
> Yuki: Please take another look— done, and tests seem to pass :)
>
> +Rick for Web Exposed tests
I added a link to the intent thread in your CL description.
webexposed LGTM
platform/ also LGTM (since it looks like you don't yet have an OWNER for that).
Thanks for making the effort to do this right everyone!
Rick Byers
Also, please be sure to update the chromestatus entry with the appropriate milestone (guessing you ...
4 years, 5 months ago
(2016-06-29 18:25:06 UTC)
#25
Also, please be sure to update the chromestatus entry with the appropriate
milestone (guessing you may merge to 53 if this misses the branch?).
Yuki
LGTM. Thank you for patiently working on this.
4 years, 5 months ago
(2016-06-30 03:43:12 UTC)
#26
LGTM. Thank you for patiently working on this.
Peter Beverloo
Thanks Rick and Yuki! I'll update the ChromeStatus entry once this lands.
4 years, 5 months ago
(2016-06-30 15:37:53 UTC)
#27
Thanks Rick and Yuki! I'll update the ChromeStatus entry once this lands.
Peter Beverloo
The CQ bit was checked by peter@chromium.org
4 years, 5 months ago
(2016-06-30 15:38:06 UTC)
#28
Description was changed from ========== Ship the Notification.action and Notification.vibration properties This CL changes the ...
4 years, 5 months ago
(2016-06-30 16:16:28 UTC)
#31
Message was sent while issue was closed.
Description was changed from
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2Oagzgag...
BUG=547716, 442132
==========
to
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2Oagzgag...
BUG=547716, 442132
==========
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago
(2016-06-30 16:16:30 UTC)
#32
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
commit-bot: I haz the power
Description was changed from ========== Ship the Notification.action and Notification.vibration properties This CL changes the ...
4 years, 5 months ago
(2016-06-30 16:20:00 UTC)
#33
Message was sent while issue was closed.
Description was changed from
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2Oagzgag...
BUG=547716, 442132
==========
to
==========
Ship the Notification.action and Notification.vibration properties
This CL changes the return types of both properties to FrozenArray<>,
amends Notification.actions to also freeze the individual
NotificationAction objects contained therein, and enables the properties
by default.
In addition, [SameObject] semantics have been added to the two
properties, which now mean that they will continue to return the same
value, making the equality operator work as expected.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/0mBO8Q5FhTo/2Oagzgag...
BUG=547716, 442132
Committed: https://crrev.com/b16af0ae12f9d37558e95cb92222c4313df098c0
Cr-Commit-Position: refs/heads/master@{#403191}
==========
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/b16af0ae12f9d37558e95cb92222c4313df098c0 Cr-Commit-Position: refs/heads/master@{#403191}
4 years, 5 months ago
(2016-06-30 16:20:01 UTC)
#34
Issue 1974033003: Ship the Notification.action and Notification.vibration properties
(Closed)
Created 4 years, 7 months ago by Peter Beverloo
Modified 4 years, 5 months ago
Reviewers: johnme, bashi, haraken, domenic, Yuki, Rick Byers
Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe-statics
Comments: 3