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

Issue 1265573003: Fix crash on null ptr dereference in EventPath propagation (Closed)

Created:
5 years, 4 months ago by kochi
Modified:
5 years, 4 months ago
Reviewers:
hayato, dtapuska
CC:
blink-reviews
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Fix crash on null ptr dereference in EventPath propagation Usually ShadowRoot->host() is non-null, but a test case revealed that during event propagation, non-null is not guaranteed. There are some conditions required to reproduce: 1. some synchronous events have to be queued 2. shadow host is removed during a prior event handler 3. a queued event is delivered to the orphaned shadow tree (including its shadow root, whose host is null) This happens when a shadow host's ElementShadow object is destructed. If Oilpan is enabled, this doesn't happen because the host's ElementShadow is not destructed immediately. This is from issue 1230503002 at patchset 1 (http://crrev.com/1230503002#ps1) Modified to make the change effective only when Oilpan is disabled. BUG=507413 TEST=fast/event/event-fire-disconnected-shadow-dom-crash.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199940

Patch Set 1 : dtapuska@'s original change #

Patch Set 2 : make the change effective only when !OILPAN #

Patch Set 3 : rebase #

Patch Set 4 : update comments, rename test case. #

Patch Set 5 : add another comment #

Total comments: 1

Patch Set 6 : minimize test case #

Patch Set 7 : update the comment (not necessarily async events) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -0 lines) Patch
A LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/dom/Node.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/EventPath.cpp View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
kochi
Hayato, could you review this?
5 years, 4 months ago (2015-07-30 09:25:48 UTC) #2
hayato
On 2015/07/30 09:25:48, Takayoshi Kochi wrote: > Hayato, could you review this? I'm afraid that ...
5 years, 4 months ago (2015-07-31 05:55:45 UTC) #3
kochi
On 2015/07/31 05:55:45, hayato wrote: > On 2015/07/30 09:25:48, Takayoshi Kochi wrote: > > Hayato, ...
5 years, 4 months ago (2015-07-31 06:06:54 UTC) #4
hayato
On 2015/07/31 06:06:54, Takayoshi Kochi wrote: > On 2015/07/31 05:55:45, hayato wrote: > > On ...
5 years, 4 months ago (2015-08-03 01:30:59 UTC) #5
kochi
On 2015/08/03 01:30:59, hayato wrote: > On 2015/07/31 06:06:54, Takayoshi Kochi wrote: > > On ...
5 years, 4 months ago (2015-08-03 04:54:21 UTC) #6
hayato
Thanks. The description looks much better! https://codereview.chromium.org/1265573003/diff/80001/LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html File LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html (right): https://codereview.chromium.org/1265573003/diff/80001/LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html#newcode1 LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html:1: <!DOCTYPE html> Could ...
5 years, 4 months ago (2015-08-03 05:49:25 UTC) #7
kochi
On 2015/08/03 05:49:25, hayato wrote: > Thanks. The description looks much better! > > https://codereview.chromium.org/1265573003/diff/80001/LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash.html ...
5 years, 4 months ago (2015-08-03 11:19:48 UTC) #8
hayato
On 2015/08/03 11:19:48, Takayoshi Kochi wrote: > On 2015/08/03 05:49:25, hayato wrote: > > Thanks. ...
5 years, 4 months ago (2015-08-04 04:35:15 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1265573003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1265573003/120001
5 years, 4 months ago (2015-08-04 04:36:58 UTC) #11
commit-bot: I haz the power
5 years, 4 months ago (2015-08-04 05:50:42 UTC) #12
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=199940

Powered by Google App Engine
This is Rietveld 408576698