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

Issue 374093002: Node.appendChild should throw TypeError when newChild is not an object (Closed)

Created:
6 years, 5 months ago by kangil_
Modified:
6 years, 5 months ago
Reviewers:
tkent, haraken
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Node.appendChild should throw TypeError when newChild is not an object SPEC: http://www.w3.org/TR/WebIDL/#es-interface According to spec, 'If Type(V) is not Object, then throw a TypeError.' So this CL modified it as per specified. TEST=LayoutTests/fast/dom/incompatible-operations.html ,LayoutTests/fast/dom/move-nodes-across-documents.html ,LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml In addition, with this CL, 4 test cases will be passed at http://w3c-test.org/dom/nodes/Node-appendChild.html Behavior in other browsers. *)FF: PASS *)IE: FAIL Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177721

Patch Set 1 #

Total comments: 2

Patch Set 2 : Take review comment into consideration #

Patch Set 3 : Fix layout test #

Total comments: 2

Patch Set 4 : Take review comment into consideration and fix failed layout test cases #

Patch Set 5 : Take review comment into consideration #

Patch Set 6 : Remove commented line only #

Patch Set 7 : Fix layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -17 lines) Patch
M LayoutTests/fast/dom/incompatible-operations.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/dom/incompatible-operations-expected.txt View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/dom/move-nodes-across-documents.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml View 1 2 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/processing-instruction-appendChild-exceptions-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8NodeCustom.cpp View 1 2 3 4 6 1 chunk +16 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
kangil_
PTAL
6 years, 5 months ago (2014-07-08 14:23:06 UTC) #1
haraken
The behavior change looks fine. The new behavior aligns with the spec and Firefox. Also ...
6 years, 5 months ago (2014-07-08 14:59:02 UTC) #2
kangil_
Great, thanks! PTAL. https://codereview.chromium.org/374093002/diff/1/Source/bindings/core/v8/custom/V8NodeCustom.cpp File Source/bindings/core/v8/custom/V8NodeCustom.cpp (right): https://codereview.chromium.org/374093002/diff/1/Source/bindings/core/v8/custom/V8NodeCustom.cpp#newcode114 Source/bindings/core/v8/custom/V8NodeCustom.cpp:114: return; On 2014/07/08 14:59:01, haraken wrote: ...
6 years, 5 months ago (2014-07-09 01:34:17 UTC) #3
haraken
LGTM https://codereview.chromium.org/374093002/diff/40001/Source/bindings/core/v8/custom/V8NodeCustom.cpp File Source/bindings/core/v8/custom/V8NodeCustom.cpp (right): https://codereview.chromium.org/374093002/diff/40001/Source/bindings/core/v8/custom/V8NodeCustom.cpp#newcode112 Source/bindings/core/v8/custom/V8NodeCustom.cpp:112: throwMinimumArityTypeErrorForMethod("appendChild", "Node", 1, info.Length(), info.GetIsolate()); Can we make ...
6 years, 5 months ago (2014-07-09 01:38:53 UTC) #4
kangil_
Fortunately, current layout tests has coverage. :) PTAL https://codereview.chromium.org/374093002/diff/40001/Source/bindings/core/v8/custom/V8NodeCustom.cpp File Source/bindings/core/v8/custom/V8NodeCustom.cpp (right): https://codereview.chromium.org/374093002/diff/40001/Source/bindings/core/v8/custom/V8NodeCustom.cpp#newcode112 Source/bindings/core/v8/custom/V8NodeCustom.cpp:112: throwMinimumArityTypeErrorForMethod("appendChild", ...
6 years, 5 months ago (2014-07-09 02:53:20 UTC) #5
haraken
> Fortunately, current layout tests has coverage. :) Even if we already have coverage, we ...
6 years, 5 months ago (2014-07-09 03:09:58 UTC) #6
kangil_
On 2014/07/09 03:09:58, haraken wrote: > > Fortunately, current layout tests has coverage. :) > ...
6 years, 5 months ago (2014-07-09 04:53:33 UTC) #7
haraken
LGTM
6 years, 5 months ago (2014-07-09 04:57:17 UTC) #8
kangil_
On 2014/07/09 04:53:33, kangil_ wrote: > On 2014/07/09 03:09:58, haraken wrote: > > > Fortunately, ...
6 years, 5 months ago (2014-07-09 04:57:29 UTC) #9
kangil_
On 2014/07/09 04:57:29, kangil_ wrote: > On 2014/07/09 04:53:33, kangil_ wrote: > > On 2014/07/09 ...
6 years, 5 months ago (2014-07-09 05:39:41 UTC) #10
haraken
still LGTM
6 years, 5 months ago (2014-07-09 05:41:29 UTC) #11
kangil_
The CQ bit was checked by kangil.han@samsung.com
6 years, 5 months ago (2014-07-09 05:46:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kangil.han@samsung.com/374093002/110001
6 years, 5 months ago (2014-07-09 05:47:10 UTC) #13
commit-bot: I haz the power
6 years, 5 months ago (2014-07-09 06:48:20 UTC) #14
Message was sent while issue was closed.
Change committed as 177721

Powered by Google App Engine
This is Rietveld 408576698