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

Issue 2365083002: Make NGFragment to own NGPhysicalFragment (Closed)

Created:
4 years, 3 months ago by Gleb Lanbin
Modified:
4 years ago
Reviewers:
cbiesinger
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make NGFragment to own NGPhysicalFragment Remove Oilpan from NGPhysicalFragment and make NGFragment to own it through unique_ptr. This will fix the issue with limited number(it's about ~150 today) of supported physical fragment children in LayoutNG code. The problem can be reproduced by creating a tree with depth > 150 and running it through LayoutNG code. Oilpan will crash with visitor->heap().stackFrameDepth().isAcceptableStackUse() once kSafeStackFrameSize > 32 * 1024 while trying to trace a vector BUG=635619

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -169 lines) Patch
M third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 4 chunks +12 lines, -12 lines 1 comment Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 13 chunks +23 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_box.h View 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_box.cc View 4 chunks +17 lines, -18 lines 1 comment Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 4 chunks +7 lines, -5 lines 1 comment Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 5 chunks +31 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc View 4 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h View 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_input_text.h View 2 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h View 1 chunk +3 lines, -5 lines 1 comment Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h View 1 chunk +3 lines, -8 lines 1 comment Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.h View 2 chunks +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc View 1 chunk +1 line, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.h View 1 chunk +1 line, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_text_fragment.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (12 generated)
Gleb Lanbin
4 years, 3 months ago (2016-09-23 23:58:39 UTC) #3
Gleb Lanbin
On 2016/09/23 23:58:39, glebl wrote: I think it's probably better to discuss the HeapVector limitation ...
4 years, 2 months ago (2016-09-25 22:19:45 UTC) #11
Gleb Lanbin
On 2016/09/23 23:58:39, glebl wrote: I think it's probably better to discuss the HeapVector limitation ...
4 years, 2 months ago (2016-09-25 22:19:46 UTC) #12
cbiesinger
4 years, 2 months ago (2016-09-26 17:17:55 UTC) #16
disappointing that oilpan can't handle this :(

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
(right):

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:76: if
(!current_child_->Layout(constraint_space_for_children_.get()))
Why did you remove the out param?

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/ng/ng_box.cc (right):

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/ng/ng_box.cc:143: if (layout_box_ &&
fragment_->PhysicalFragment()) {
Can PhysicalFragment() ever be null?

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h (right):

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h:125:
DEFINE_INLINE_TRACE(){};
no semicolon here. shouldn't there be a space before {} ?

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h
(left):

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h:57:
class CORE_EXPORT NGPhysicalConstraintSpace final
Why remove the final?

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h (right):

https://codereview.chromium.org/2365083002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h:28: return
children_;
I really think you should document in the builder & in the header of this file
that the child fragments need to be kept alive by the caller as this class just
keeps a pointer to them. that's pretty subtle...

Powered by Google App Engine
This is Rietveld 408576698