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

Issue 2474483002: [LazyParseCSS] Ensure UseCounting has parity with strict parsing (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years ago
Reviewers:
Timothy Loh, rune
CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[LazyParseCSS] Ensure UseCounting has parity with strict parsing This patch revamps lazy parsing UseCounting to be as safe and accurate as possible. For sheets that need counting, we always try to find a valid Document and use its UseCounter when doing any parsing work. We maintain a WeakMember to the owning Document to ensure our parsing context stays valid. BUG=642722 Committed: https://crrev.com/f8090ce1eb0631947f38a75bd27fa8325facf921 Cr-Commit-Position: refs/heads/master@{#436439}

Patch Set 1 #

Patch Set 2 : Add StyleSheetContents::anyOwnerDocument() #

Total comments: 5

Patch Set 3 : tweaks #

Patch Set 4 : remove overhead tracking code #

Patch Set 5 : s/!/!!/ #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -31 lines) Patch
M third_party/WebKit/Source/core/css/StyleSheetContents.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.cpp View 1 2 2 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h View 1 2 3 3 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp View 1 2 3 4 4 chunks +23 lines, -4 lines 3 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingTest.cpp View 1 2 3 4 2 chunks +34 lines, -23 lines 0 comments Download

Messages

Total messages: 50 (28 generated)
Charlie Harrison
timloh: PTAL at this quick fix? I think semantics should be identical. If there is ...
4 years, 1 month ago (2016-11-01 21:52:42 UTC) #5
Charlie Harrison
timloh: friendly ping.
4 years, 1 month ago (2016-11-21 03:07:34 UTC) #8
Timothy Loh
On 2016/11/21 03:07:34, Charlie Harrison wrote: > timloh: friendly ping. I'm not really familiar with ...
4 years ago (2016-11-30 14:58:26 UTC) #9
Charlie Harrison
We still call it when we end up updating the parsing context (which we do ...
4 years ago (2016-11-30 15:16:10 UTC) #10
Charlie Harrison
+rune for a bit of help with StyleSheetContents and UseCounters.
4 years ago (2016-11-30 19:53:49 UTC) #12
rune
On 2016/11/30 19:53:49, Charlie Harrison wrote: > +rune for a bit of help with StyleSheetContents ...
4 years ago (2016-11-30 20:47:59 UTC) #13
Charlie Harrison
Thank you very much for the explanation! I believe you are right about this code. ...
4 years ago (2016-11-30 21:14:23 UTC) #14
rune
On 2016/11/30 21:14:23, Charlie Harrison wrote: > Thank you very much for the explanation! I ...
4 years ago (2016-12-01 09:18:34 UTC) #15
Charlie Harrison
On 2016/12/01 09:18:34, rune wrote: > On 2016/11/30 21:14:23, Charlie Harrison wrote: > > Thank ...
4 years ago (2016-12-01 14:07:21 UTC) #16
rune
On 2016/12/01 14:07:21, Charlie Harrison wrote: > On 2016/12/01 09:18:34, rune wrote: > > Do ...
4 years ago (2016-12-01 15:20:45 UTC) #17
Charlie Harrison
On 2016/12/01 15:20:45, rune wrote: > On 2016/12/01 14:07:21, Charlie Harrison wrote: > > On ...
4 years ago (2016-12-02 18:35:37 UTC) #20
rune
lgtm if nits/issues are fixed or justified. https://codereview.chromium.org/2474483002/diff/20001/third_party/WebKit/Source/core/css/StyleSheetContents.cpp File third_party/WebKit/Source/core/css/StyleSheetContents.cpp (right): https://codereview.chromium.org/2474483002/diff/20001/third_party/WebKit/Source/core/css/StyleSheetContents.cpp#newcode549 third_party/WebKit/Source/core/css/StyleSheetContents.cpp:549: : (*m_completedClients.begin())->ownerDocument(); ...
4 years ago (2016-12-02 22:18:09 UTC) #23
rune
Just noticed that DCHECKs failed during testing.
4 years ago (2016-12-02 22:19:44 UTC) #24
Charlie Harrison
Yeah I'm investigating the DCHECK failures now, thanks for the review. https://codereview.chromium.org/2474483002/diff/20001/third_party/WebKit/Source/core/css/StyleSheetContents.cpp File third_party/WebKit/Source/core/css/StyleSheetContents.cpp (right): ...
4 years ago (2016-12-02 22:38:46 UTC) #25
Charlie Harrison
Since we don't always have a single owner node (and thus we don't always use ...
4 years ago (2016-12-05 19:30:10 UTC) #38
rune
lgtm https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp File third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp (right): https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp#newcode50 third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp:50: UseCounter* useCounter = UseCounter::getFrom(m_document); If we always retrieve ...
4 years ago (2016-12-05 22:21:05 UTC) #40
Charlie Harrison
https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp File third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp (right): https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp#newcode50 third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp:50: UseCounter* useCounter = UseCounter::getFrom(m_document); On 2016/12/05 22:21:05, rune wrote: ...
4 years ago (2016-12-05 22:27:59 UTC) #41
rune
https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp File third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp (right): https://codereview.chromium.org/2474483002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp#newcode50 third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp:50: UseCounter* useCounter = UseCounter::getFrom(m_document); On 2016/12/05 22:27:59, Charlie Harrison ...
4 years ago (2016-12-05 22:31:53 UTC) #42
Charlie Harrison
Thanks. Sending to CQ
4 years ago (2016-12-05 22:51:46 UTC) #43
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/2474483002/80001
4 years ago (2016-12-05 22:52:28 UTC) #45
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-05 22:58:52 UTC) #48
commit-bot: I haz the power
4 years ago (2016-12-05 23:01:29 UTC) #50
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f8090ce1eb0631947f38a75bd27fa8325facf921
Cr-Commit-Position: refs/heads/master@{#436439}

Powered by Google App Engine
This is Rietveld 408576698