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

Issue 18375005: [oilpan] Move CSSFontFace and CSSSegmentedFontFace to the managed heap (Closed)

Created:
7 years, 5 months ago by haraken
Modified:
7 years, 5 months ago
CC:
blink-reviews, adamk+oilpan_chromium.org, abarth-chromium
Visibility:
Public.

Description

[oilpan] Move CSSFontFace and CSSSegmentedFontFace to the managed heap Split into CLs: https://codereview.chromium.org/18856015/ https://codereview.chromium.org/18882002/

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Total comments: 9

Patch Set 3 : #

Patch Set 4 : #

Total comments: 3

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Total comments: 1

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -7 lines) Patch
M Source/core/css/CSSFontSelector.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSFontSelector.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/CSSSegmentedFontFace.h View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -2 lines 0 comments Download
M Source/core/css/CSSSegmentedFontFace.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
haraken
PTAL
7 years, 5 months ago (2013-07-02 13:33:35 UTC) #1
zerny-google
Hi Haraken, A few comments in passing. https://codereview.chromium.org/18375005/diff/1/Source/core/css/CSSFontFace.h File Source/core/css/CSSFontFace.h (right): https://codereview.chromium.org/18375005/diff/1/Source/core/css/CSSFontFace.h#newcode36 Source/core/css/CSSFontFace.h:36: #include <wtf/RefCounted.h> ...
7 years, 5 months ago (2013-07-02 14:24:04 UTC) #2
haraken
Thanks for reviewing, updated the CL. https://codereview.chromium.org/18375005/diff/1/Source/core/css/CSSFontFace.h File Source/core/css/CSSFontFace.h (right): https://codereview.chromium.org/18375005/diff/1/Source/core/css/CSSFontFace.h#newcode36 Source/core/css/CSSFontFace.h:36: #include <wtf/RefCounted.h> On ...
7 years, 5 months ago (2013-07-02 14:31:30 UTC) #3
Mads Ager (chromium)
https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontFace.cpp File Source/core/css/CSSFontFace.cpp (right): https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontFace.cpp#newcode171 Source/core/css/CSSFontFace.cpp:171: for (HashSet<Member<CSSSegmentedFontFace> >::const_iterator it = m_segmentedFontFaces.begin(); it != m_segmentedFontFaces.end(); ...
7 years, 5 months ago (2013-07-02 14:59:23 UTC) #4
haraken
https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontFace.cpp File Source/core/css/CSSFontFace.cpp (right): https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontFace.cpp#newcode171 Source/core/css/CSSFontFace.cpp:171: for (HashSet<Member<CSSSegmentedFontFace> >::const_iterator it = m_segmentedFontFaces.begin(); it != m_segmentedFontFaces.end(); ...
7 years, 5 months ago (2013-07-03 04:39:19 UTC) #5
Mads Ager (chromium)
https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontSelector.cpp File Source/core/css/CSSFontSelector.cpp (right): https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontSelector.cpp#newcode295 Source/core/css/CSSFontSelector.cpp:295: OwnPtr<CSSFontFaceVectorCollection>& familyFontFaces = m_fontFaces.add(familyName, nullptr).iterator->value; On 2013/07/03 04:39:20, haraken ...
7 years, 5 months ago (2013-07-03 06:30:41 UTC) #6
haraken
Comments addressed. Updated the CL. PTAL. https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontSelector.cpp File Source/core/css/CSSFontSelector.cpp (right): https://codereview.chromium.org/18375005/diff/8001/Source/core/css/CSSFontSelector.cpp#newcode295 Source/core/css/CSSFontSelector.cpp:295: OwnPtr<CSSFontFaceVectorCollection>& familyFontFaces = ...
7 years, 5 months ago (2013-07-03 07:46:01 UTC) #7
Mads Ager (chromium)
LGTM!
7 years, 5 months ago (2013-07-03 08:10:19 UTC) #8
haraken
I made two changes to pass all tests. Landing... https://codereview.chromium.org/18375005/diff/22001/Source/core/css/CSSFontSelector.cpp File Source/core/css/CSSFontSelector.cpp (right): https://codereview.chromium.org/18375005/diff/22001/Source/core/css/CSSFontSelector.cpp#newcode531 Source/core/css/CSSFontSelector.cpp:531: ...
7 years, 5 months ago (2013-07-03 12:03:23 UTC) #9
Mads Ager (google)
https://codereview.chromium.org/18375005/diff/22001/Source/core/css/CSSFontSelector.cpp File Source/core/css/CSSFontSelector.cpp (right): https://codereview.chromium.org/18375005/diff/22001/Source/core/css/CSSFontSelector.cpp#newcode531 Source/core/css/CSSFontSelector.cpp:531: Vector<Handle<CSSFontFace>, 32> candidateFontFaces; On 2013/07/03 12:03:23, haraken wrote: > ...
7 years, 5 months ago (2013-07-03 12:18:38 UTC) #10
haraken
> Right, just to be clear on this. The lifetime of the FontFace and the ...
7 years, 5 months ago (2013-07-03 12:24:56 UTC) #11
haraken
https://codereview.chromium.org/18375005/diff/33001/Source/core/css/CSSSegmentedFontFace.h File Source/core/css/CSSSegmentedFontFace.h (right): https://codereview.chromium.org/18375005/diff/33001/Source/core/css/CSSSegmentedFontFace.h#newcode78 Source/core/css/CSSSegmentedFontFace.h:78: RefPtr<CSSFontSelector> m_fontSelector; Adding this RefPtr fixed the heap corruption ...
7 years, 5 months ago (2013-07-04 08:03:44 UTC) #12
Mads Ager (chromium)
On 2013/07/04 08:03:44, haraken wrote: > https://codereview.chromium.org/18375005/diff/33001/Source/core/css/CSSSegmentedFontFace.h > File Source/core/css/CSSSegmentedFontFace.h (right): > > https://codereview.chromium.org/18375005/diff/33001/Source/core/css/CSSSegmentedFontFace.h#newcode78 > ...
7 years, 5 months ago (2013-07-04 08:13:43 UTC) #13
haraken
> I think we need to look a bit deeper here. Adding a RefPtr here ...
7 years, 5 months ago (2013-07-04 08:17:54 UTC) #14
haraken
hmm, still looking into the crash cause... With my CL, some unexpected message loop is ...
7 years, 5 months ago (2013-07-08 09:20:08 UTC) #15
haraken
7 years, 5 months ago (2013-07-09 06:57:15 UTC) #16
I finally found the cause of the crash. There are two complicated factors about
lifetime management of CSSFontFace, which is hard to explain here. In short,

[1] CSSFontSelector has a Persistent to CSSSegmentedFontFace.
CSSSegmentedFontFace has a back pointer (raw pointer) to CSSFontSelector. Thus,
we have to explicitly clear the back pointer when destructing the Persistent.

[2] CSSSegmentedFontFace has a Member to CSSFontFace. CSSFontFace also has a
back pointer to CSSSegmentedFontFace. Thus, we have to clear the back pointer
when destructing the Member. (Note: Even in the world where we move both
CSSSegmentedFontFace and CSSFontFace to the managed heap, we cannot express the
back pointer as a Member for some complicated reason.)

I'll upload a CL to fix these problems soon.

Powered by Google App Engine
This is Rietveld 408576698