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

Issue 2306923002: Prevent recursion in critical part of CustomElementRegistry::define. (Closed)

Created:
4 years, 3 months ago by dominicc (has gone to gerrit)
Modified:
4 years, 3 months ago
Reviewers:
domenic, kochi
CC:
blink-reviews, 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

Prevent recursion in critical part of CustomElementRegistry::define. Custom element registry used to allow recursion, but this complicated the check for whether a name was in use. Now define [1] has an simpler explicit recursion guard called the "element definition is running flag." [2] [1] https://html.spec.whatwg.org/#dom-customelementregistry-define [2] https://html.spec.whatwg.org/#element-definition-is-running BUG=643051 Committed: https://crrev.com/fade7ae22a3ea448947c5c90cb1a2ac2b5c30781 Cr-Commit-Position: refs/heads/master@{#416460}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -70 lines) Patch
M third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html View 1 12 chunks +104 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.h View 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp View 5 chunks +41 lines, -41 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
dominicc (has gone to gerrit)
PTAL
4 years, 3 months ago (2016-09-02 07:24:12 UTC) #4
domenic
On 2016/09/02 at 07:24:12, dominicc wrote: > PTAL LGTM with some test nits and suggestions. ...
4 years, 3 months ago (2016-09-02 16:19:29 UTC) #7
dominicc (has gone to gerrit)
On 2016/09/02 at 16:19:29, domenic wrote: > On 2016/09/02 at 07:24:12, dominicc wrote: > > ...
4 years, 3 months ago (2016-09-03 22:17:20 UTC) #8
domenic
https://codereview.chromium.org/2306923002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (right): https://codereview.chromium.org/2306923002/diff/1/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#newcode96 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:96: w2.customElements.define('second-name', X); This test is very interesting. Maybe also ...
4 years, 3 months ago (2016-09-03 22:50:35 UTC) #9
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/2306923002/20001
4 years, 3 months ago (2016-09-03 23:23:50 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-04 01:01:16 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/fade7ae22a3ea448947c5c90cb1a2ac2b5c30781 Cr-Commit-Position: refs/heads/master@{#416460}
4 years, 3 months ago (2016-09-04 01:02:56 UTC) #15
kochi
lgtm sorry for the delay, missed this on Friday. domenic@, the pattern ElementDefinitionIsRunning class is ...
4 years, 3 months ago (2016-09-05 02:28:47 UTC) #16
domenic
4 years, 3 months ago (2016-09-06 18:14:21 UTC) #17
Message was sent while issue was closed.
On 2016/09/05 at 02:28:47, kochi wrote:
> lgtm sorry for the delay, missed this on Friday.
> 
> domenic@, the pattern ElementDefinitionIsRunning class is
> using is so-called RAII; often used in C++ code.

Right, I'm very aware of RAII; it was taking a bool& reference to another
class's private members and mutating it as part of the RAII lifecycle that I
hadn't seen before.

Powered by Google App Engine
This is Rietveld 408576698