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

Issue 2274883005: Fix ScriptCustomElementDefinition::createElementSync to use the given document (Closed)

Created:
4 years, 3 months ago by kojii
Modified:
4 years, 3 months ago
Reviewers:
tkent, haraken, kochi
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, eae+blinkwatch, rwlbuis, sof, webcomponents-bugzilla_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix ScriptCustomElementDefinition::createElementSync to use the given document This patch fixes ScriptCustomElementDefinition::createElementSync to create an element with its ownerDocument set to the given document by using the construction stack. Before this fix, V8HTMLElement::constructorCustom assumed it matches to window.document. The assumption does not stand when custom elements are created in import documents. BUG=640465 Committed: https://crrev.com/9636049c6e6b9509f94d29532f4274af5ee79d34 Cr-Commit-Position: refs/heads/master@{#414434}

Patch Set 1 #

Patch Set 2 : Fix typo in comment #

Total comments: 6

Patch Set 3 : kochi@ review #

Patch Set 4 : tkent@ nit #

Patch Set 5 : Rebase #

Patch Set 6 : Remove #if DCHECK_IS_ON() due to failure on CrOS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -23 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp View 1 chunk +1 line, -9 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h View 1 2 3 4 5 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp View 1 2 3 4 5 3 chunks +40 lines, -11 lines 0 comments Download

Messages

Total messages: 31 (16 generated)
kojii
PTAL. kochi@, if your fix looks more preferable, please disregard and go ahead.
4 years, 3 months ago (2016-08-25 07:58:05 UTC) #7
kochi
This is shorter and unifies upgrade/synchronous create paths, so look nicer to me. https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h File ...
4 years, 3 months ago (2016-08-25 08:18:11 UTC) #9
kojii
tkent@, PTAL. I'll work on kochi@'s comments.
4 years, 3 months ago (2016-08-25 08:53:30 UTC) #11
kojii
https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h File third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h (right): https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h#newcode77 third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h:77: class CORE_EXPORT ConstructionStackScope final { On 2016/08/25 at 08:18:11, ...
4 years, 3 months ago (2016-08-25 09:01:17 UTC) #13
tkent
lgtm. This looks a clean solution. https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h File third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h (right): https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h#newcode79 third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h:79: WTF_MAKE_NONCOPYABLE(ConstructionStackScope); nit: Let's ...
4 years, 3 months ago (2016-08-25 09:03:35 UTC) #15
haraken
bindings/ LGTM
4 years, 3 months ago (2016-08-25 09:08:49 UTC) #16
kochi
lgtm https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h File third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h (right): https://codereview.chromium.org/2274883005/diff/20001/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h#newcode77 third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h:77: class CORE_EXPORT ConstructionStackScope final { On 2016/08/25 09:01:17, ...
4 years, 3 months ago (2016-08-25 09:12:19 UTC) #17
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/2274883005/80001
4 years, 3 months ago (2016-08-25 09:13:52 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/189473)
4 years, 3 months ago (2016-08-25 09:38:26 UTC) #22
kochi
Hmm, maybe just remove #ifdef DCHECK_IS_ON() and #endif? As instance will be on stack, memory ...
4 years, 3 months ago (2016-08-25 09:59:36 UTC) #23
kojii
Failed to compile only on CrOS? That's weird...
4 years, 3 months ago (2016-08-25 11:52:38 UTC) #24
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/2274883005/100001
4 years, 3 months ago (2016-08-25 11:53:29 UTC) #27
kochi
On 2016/08/25 11:52:38, kojii wrote: > Failed to compile only on CrOS? That's weird... Maybe ...
4 years, 3 months ago (2016-08-25 14:20:33 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-08-25 14:40:51 UTC) #29
commit-bot: I haz the power
4 years, 3 months ago (2016-08-25 14:43:52 UTC) #31
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9636049c6e6b9509f94d29532f4274af5ee79d34
Cr-Commit-Position: refs/heads/master@{#414434}

Powered by Google App Engine
This is Rietveld 408576698