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

Issue 2754713002: Make CustomEvent#initCustomEvent match the spec (Closed)

Created:
3 years, 9 months ago by lunalu1
Modified:
3 years, 9 months ago
Reviewers:
foolip
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CustomEvent#initCustomEvent match the spec BUG=701555 Review-Url: https://codereview.chromium.org/2754713002 Cr-Commit-Position: refs/heads/master@{#458572} Committed: https://chromium.googlesource.com/chromium/src/+/9764445b1b6c87a3cabf085b63af1d549b079a6b

Patch Set 1 #

Patch Set 2 : Bug fix for layout tests #

Patch Set 3 : Update interfaces-expected #

Patch Set 4 : Update test expect #

Total comments: 3

Patch Set 5 : Codereview: nit Update tests expect after rebase #

Messages

Total messages: 33 (24 generated)
lunalu1
PTAL
3 years, 9 months ago (2017-03-16 18:28:59 UTC) #9
foolip
lgtm % DHECK_GE https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp File third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp (right): https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp#newcode109 third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp:109: DCHECK_GE(info.Length(), 1); I think it's OK ...
3 years, 9 months ago (2017-03-21 08:14:38 UTC) #17
lunalu1
Done. Thanks https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp File third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp (right): https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp#newcode109 third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp:109: DCHECK_GE(info.Length(), 1); On 2017/03/21 08:14:38, foolip_UTC9 wrote: ...
3 years, 9 months ago (2017-03-21 17:33:23 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2754713002/80001
3 years, 9 months ago (2017-03-21 17:34:15 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2754713002/100001
3 years, 9 months ago (2017-03-21 18:37:59 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/413274)
3 years, 9 months ago (2017-03-21 19:59:29 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2754713002/100001
3 years, 9 months ago (2017-03-21 20:45:43 UTC) #29
commit-bot: I haz the power
Committed patchset #5 (id:100001) as https://chromium.googlesource.com/chromium/src/+/9764445b1b6c87a3cabf085b63af1d549b079a6b
3 years, 9 months ago (2017-03-21 22:04:36 UTC) #32
foolip
3 years, 9 months ago (2017-03-22 05:38:40 UTC) #33
Message was sent while issue was closed.
https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
(right):

https://codereview.chromium.org/2754713002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp:109:
DCHECK_GE(info.Length(), 1);
On 2017/03/21 17:33:23, loonybear wrote:
> On 2017/03/21 08:14:38, foolip_UTC9 wrote:
> > I think it's OK to just remove the assert, it was there to show why the
> info[3]
> > access was safe, but now we have a conditional instead since we can reach
this
> > code with <4 arguments.
> 
> This doesn't make sense. If we want to show why info[3] is access-safe,
> shouldn't 
> we be checking info.length() >= 4? But I will remove the ASSERT / DCHECK
> anyways. 

The info[3] access is now guarded by if (info.length() >= 4), making that
clearly safe. What remained of the assert I think would have essentially been
verifying that the generated code for initCustomEventMethod correctly returns
early if given no arguments, but for no particular reason, and not helping make
any guarantees for the code that follows.

Powered by Google App Engine
This is Rietveld 408576698