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

Issue 2241193004: Fix a crash: SlotAssignment is unintentionally created for v0 shadow trees (Closed)

Created:
4 years, 4 months ago by hayato
Modified:
4 years, 4 months ago
Reviewers:
kochi
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof, webcomponents-bugzilla_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a crash: SlotAssignment is unintentionally created for v0 shadow trees HTMLSlotElement::insertedInto() creates SlotAssignment wrongly for a v0 shadow tree because it does *not* check the type of the shadow root. As a result, the entry for the slot would not be removed from the SlotAssignment when the slot is removed from the shadow tree because HTMLSlotElement::removedFrom() *does* check the type of the shadow root correctly. This violates the assumption that a slot in an entry is always in a shadow root, and hit the DCHECK, and causes a crash in a release build. This CL fixes this unintentional wrong behavior. BUG=634506 Committed: https://crrev.com/b43d492d6fdd6c44cade1de7c976c402d440a665 Cr-Commit-Position: refs/heads/master@{#412184}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/shadow-dom/crashes/slots-in-v0-crash.html View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSlotElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (8 generated)
hayato
PTAL
4 years, 4 months ago (2016-08-16 06:06:53 UTC) #6
kochi
LGTM
4 years, 4 months ago (2016-08-16 06:41:05 UTC) #7
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/2241193004/1
4 years, 4 months ago (2016-08-16 06:50:56 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-16 07:17:57 UTC) #11
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 07:20:31 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/b43d492d6fdd6c44cade1de7c976c402d440a665
Cr-Commit-Position: refs/heads/master@{#412184}

Powered by Google App Engine
This is Rietveld 408576698