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

Issue 1106313003: Null check collection handling dirty scopes. (Closed)

Created:
5 years, 7 months ago by rune
Modified:
5 years, 7 months ago
Reviewers:
tasak
CC:
blink-reviews, blink-reviews-style_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Null check collection handling dirty scopes. When a shadow subtree containing a style element with a loading @import is removed from the DOM, StyleEngine::removePendingSheet() will be called, which in turn calls markTreeScopeDirty(). The collection has already been removed from m_styleSheetCollectionMap in StyleEngine has already been for the shadow root, which will lead to the collection being null when the dirty tree scopes are being handled in StyleEngine::updateActiveStyleSheetsInShadow(). Check that the node is in the Document before calling markTreeScopeDirty(). R=tasak@chromium.org BUG=482087, 468267, 463031 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194733

Patch Set 1 #

Patch Set 2 : Alternative fix checking for collection in markTreeScopeDirty #

Total comments: 4

Patch Set 3 : Addressed review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
A LayoutTests/fast/dom/shadow/remove-stylesheet-from-shadow-crash.html View 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/remove-stylesheet-from-shadow-crash-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/StyleEngine.cpp View 1 2 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 12 (2 generated)
rune
5 years, 7 months ago (2015-04-29 14:20:04 UTC) #2
tasak
FYI: https://codereview.chromium.org/1105383002 I think, we should not mark treescope dirty when a given style element ...
5 years, 7 months ago (2015-04-30 01:36:02 UTC) #3
dominicc (has gone to gerrit)
On 2015/04/30 at 01:36:02, tasak wrote: > FYI: > https://codereview.chromium.org/1105383002 > > I think, we ...
5 years, 7 months ago (2015-04-30 04:06:45 UTC) #4
tasak
On 2015/04/30 04:06:45, dominicc wrote: > On 2015/04/30 at 01:36:02, tasak wrote: > > FYI: ...
5 years, 7 months ago (2015-04-30 06:24:30 UTC) #5
rune
On 2015/04/30 06:24:30, tasak wrote: > One idea: check whether we have any collection or ...
5 years, 7 months ago (2015-04-30 07:47:57 UTC) #6
tasak
https://codereview.chromium.org/1106313003/diff/20001/Source/core/dom/StyleEngine.cpp File Source/core/dom/StyleEngine.cpp (right): https://codereview.chromium.org/1106313003/diff/20001/Source/core/dom/StyleEngine.cpp#newcode246 Source/core/dom/StyleEngine.cpp:246: markTreeScopeDirty(*treeScope); I think, we should check the styleSheetCandidateNode is ...
5 years, 7 months ago (2015-04-30 08:16:20 UTC) #7
rune
https://codereview.chromium.org/1106313003/diff/20001/Source/core/dom/StyleEngine.cpp File Source/core/dom/StyleEngine.cpp (right): https://codereview.chromium.org/1106313003/diff/20001/Source/core/dom/StyleEngine.cpp#newcode246 Source/core/dom/StyleEngine.cpp:246: markTreeScopeDirty(*treeScope); On 2015/04/30 08:16:20, tasak wrote: > I think, ...
5 years, 7 months ago (2015-04-30 08:35:45 UTC) #8
tasak
lgtm
5 years, 7 months ago (2015-04-30 09:11:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1106313003/40001
5 years, 7 months ago (2015-04-30 09:15:25 UTC) #11
commit-bot: I haz the power
5 years, 7 months ago (2015-04-30 11:58:12 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194733

Powered by Google App Engine
This is Rietveld 408576698