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

Issue 2616093003: Make CSSParserContext be garbage collected. (Closed)

Created:
3 years, 11 months ago by Bret
Modified:
3 years, 9 months ago
CC:
aazzam, ajuma+watch-canvas_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, Rik, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, dshwang, krit, eae+blinkwatch, f(malita), fs, gavinp+loader_chromium.org, gyuyoung2, Nate Chapin, Justin Novosad, kinuko+watch, kouhei+svg_chromium.org, kozyatinskiy+blink_chromium.org, loading-reviews_chromium.org, lushnikov+blink_chromium.org, pdr+svgwatchlist_chromium.org, pfeldman+blink_chromium.org, rwlbuis, Stephen Chennney, sof, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CSSParserContext be garbage collected. This is a refactor only, no functionality should change. This allocates CSSParserContext on the heap and wires it up to be garbage collected. This is necessary so in the future it can have a handle to a Document (also a GC'ed class) instead of a UseCounter. Also includes some minor API changes to CSSParserContext that I think make it more readable, since I'm changing every callsite of the class already anyway. TBR=haraken@chromium.org BUG=668251 Review-Url: https://codereview.chromium.org/2616093003 Cr-Commit-Position: refs/heads/master@{#443792} Committed: https://chromium.googlesource.com/chromium/src/+/37b65afaf587c59143a6dca1ea75a505d6c696c6

Patch Set 1 #

Patch Set 2 : revert some changes #

Patch Set 3 : revert more changes #

Patch Set 4 : fix merge #

Patch Set 5 : fix merge again #

Patch Set 6 : fix fuzzer compile #

Patch Set 7 : fix fuzzer compile #

Total comments: 13

Patch Set 8 : comments 1 #

Total comments: 10

Patch Set 9 : comments 2 #

Patch Set 10 : fixed merge #

Patch Set 11 : fix fuzzer compile again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+663 lines, -545 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/ActiveStyleSheetsTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSGroupingRule.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSPageRule.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSRule.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSRule.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleRule.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheet.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/DOMWindowCSS.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/FontFace.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/FontFaceSet.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySet.cpp View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleRuleImport.cpp View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.h View 5 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.cpp View 1 2 3 4 5 6 7 8 5 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContentsFuzzer.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp View 1 2 3 4 5 6 7 8 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.cpp View 1 2 3 4 5 6 7 8 4 chunks +9 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSLazyParsingTest.cpp View 1 2 3 4 5 6 7 8 7 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParser.h View 5 chunks +16 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParser.cpp View 1 2 3 4 5 6 7 8 10 chunks +31 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserContext.h View 1 2 3 4 5 6 7 8 3 chunks +41 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp View 1 2 3 4 5 6 7 8 2 chunks +98 lines, -52 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserImpl.h View 4 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp View 1 2 3 4 5 6 7 8 9 16 chunks +24 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 7 8 9 82 chunks +202 lines, -190 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 chunks +30 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp View 13 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp View 1 2 3 4 5 6 7 8 12 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPICaretColor.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIClip.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnGap.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFlexBasis.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontSizeAdjust.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontVariationSettings.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOffsetPosition.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOutlineOffset.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPage.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPaintOrder.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIRotate.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapCoordinate.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPISize.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationColor.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationSkip.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextUnderlinePosition.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITransformOrigin.cpp View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitPadding.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTransformOriginZ.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWillChange.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIZIndex.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIZoom.cpp View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/SharedStyleFinderTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/SelectorQuery.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/SelectorQueryTest.cpp View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngineTest.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLContentElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/LinkStyle.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResourceTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGLength.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebDocument.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 49 (31 generated)
Bret
3 years, 11 months ago (2017-01-11 02:21:02 UTC) #20
haraken
+oilpan-reviews https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp File third_party/WebKit/Source/core/css/CSSGroupingRule.cpp (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp#newcode66 third_party/WebKit/Source/core/css/CSSGroupingRule.cpp:66: new CSSParserContext(parserContext(), UseCounter::getFrom(styleSheet)); Maybe we want to have ...
3 years, 11 months ago (2017-01-11 02:42:18 UTC) #24
rune
https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp File third_party/WebKit/Source/core/css/CSSGroupingRule.cpp (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp#newcode66 third_party/WebKit/Source/core/css/CSSGroupingRule.cpp:66: new CSSParserContext(parserContext(), UseCounter::getFrom(styleSheet)); On 2017/01/11 02:42:18, haraken wrote: > ...
3 years, 11 months ago (2017-01-11 12:59:26 UTC) #25
haraken
https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp File third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp#newcode79 third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp:79: static CSSParserContext* strictContext = On 2017/01/11 12:59:26, rune wrote: ...
3 years, 11 months ago (2017-01-11 13:04:54 UTC) #26
sof
https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp File third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp#newcode79 third_party/WebKit/Source/core/css/parser/CSSParserContext.cpp:79: static CSSParserContext* strictContext = On 2017/01/11 13:04:54, haraken wrote: ...
3 years, 11 months ago (2017-01-11 13:09:21 UTC) #27
Bret
https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp File third_party/WebKit/Source/core/css/CSSGroupingRule.cpp (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp#newcode66 third_party/WebKit/Source/core/css/CSSGroupingRule.cpp:66: new CSSParserContext(parserContext(), UseCounter::getFrom(styleSheet)); On 2017/01/11 12:59:26, rune wrote: > ...
3 years, 11 months ago (2017-01-11 23:05:15 UTC) #28
haraken
LGTM with comments. https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h (right): https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h#newcode120 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h:120: Persistent<const CSSParserContext> m_context; On 2017/01/11 23:05:15, ...
3 years, 11 months ago (2017-01-12 04:51:14 UTC) #29
Bret
Changed the interface of CSSParserContext a bit to accommodate the factory functions. PTAL https://codereview.chromium.org/2616093003/diff/140001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h File ...
3 years, 11 months ago (2017-01-13 02:15:28 UTC) #30
haraken
LGTM
3 years, 11 months ago (2017-01-13 02:19:11 UTC) #31
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/2616093003/200001
3 years, 11 months ago (2017-01-14 01:14:00 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/371190)
3 years, 11 months ago (2017-01-14 01:58:53 UTC) #37
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/2616093003/220001
3 years, 11 months ago (2017-01-14 02:35:51 UTC) #40
commit-bot: I haz the power
Committed patchset #11 (id:220001) as https://chromium.googlesource.com/chromium/src/+/37b65afaf587c59143a6dca1ea75a505d6c696c6
3 years, 11 months ago (2017-01-14 06:11:55 UTC) #43
esprehn
This means we're allocating thousands of garbage collected objects when setting inline style properties or ...
3 years, 9 months ago (2017-03-22 20:20:39 UTC) #45
dcheng
On 2017/03/22 20:20:39, esprehn wrote: > This means we're allocating thousands of garbage collected objects ...
3 years, 9 months ago (2017-03-22 20:29:28 UTC) #46
Bret
On 2017/03/22 20:29:28, dcheng wrote: > On 2017/03/22 20:20:39, esprehn wrote: > > This means ...
3 years, 9 months ago (2017-03-22 20:59:51 UTC) #47
esprehn
On 2017/03/22 at 20:59:51, bsep wrote: > ... > > Also I turned the references ...
3 years, 9 months ago (2017-03-22 22:11:19 UTC) #48
haraken
3 years, 9 months ago (2017-03-22 23:38:38 UTC) #49
Message was sent while issue was closed.
If CSSParserContext is allocated so much, yes, we need to rethink about moving
it off Oilpan's heap.

Powered by Google App Engine
This is Rietveld 408576698