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

Issue 1008163003: Oilpan: move WebDevToolsFrontend to the heap.

Created:
5 years, 9 months ago by sof
Modified:
5 years, 5 months ago
Reviewers:
oilpan-reviews
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: move WebDevToolsFrontend to the heap. Make the embedder-owned WebDevToolsFrontend object wrap the underlying Blink implementation behind a WebPrivatePtr<>. That enables moving WebDevToolsFrontendImpl to the Oilpan heap, having its references to other heap objects be traced correctly. R= BUG=340522

Patch Set 1 #

Total comments: 1

Patch Set 2 : trace WebLocalFrameImpl's reference #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -30 lines) Patch
A Source/web/WebDevToolsFrontend.cpp View 1 chunk +46 lines, -0 lines 0 comments Download
M Source/web/WebDevToolsFrontendImpl.h View 3 chunks +11 lines, -7 lines 0 comments Download
M Source/web/WebDevToolsFrontendImpl.cpp View 2 chunks +8 lines, -19 lines 0 comments Download
M Source/web/WebLocalFrameImpl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 3 chunks +3 lines, -1 line 0 comments Download
M Source/web/web.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M public/web/WebDevToolsFrontend.h View 3 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
sof
please take a look. https://codereview.chromium.org/1008163003/diff/1/Source/web/WebDevToolsFrontendImpl.cpp File Source/web/WebDevToolsFrontendImpl.cpp (right): https://codereview.chromium.org/1008163003/diff/1/Source/web/WebDevToolsFrontendImpl.cpp#newcode55 Source/web/WebDevToolsFrontendImpl.cpp:55: // Q: where is this ...
5 years, 9 months ago (2015-03-15 14:10:56 UTC) #2
pfeldman
How is this related to the DOM hierarchy bug? What isbthe rationale of this? We ...
5 years, 9 months ago (2015-03-15 14:33:32 UTC) #3
sof
On 2015/03/15 14:33:32, pfeldman wrote: > How is this related to the DOM hierarchy bug? ...
5 years, 9 months ago (2015-03-15 14:41:08 UTC) #4
pfeldman
> The WebLocalFrameImpl reference on WebDevToolsFrontendImpl is a raw pointer to > an Oilpan heap ...
5 years, 9 months ago (2015-03-15 15:05:11 UTC) #5
sof
On 2015/03/15 15:05:11, pfeldman wrote: > > The WebLocalFrameImpl reference on WebDevToolsFrontendImpl is a raw ...
5 years, 9 months ago (2015-03-15 15:52:39 UTC) #6
pfeldman
> We need to keep it alive from the renderer side, but Oilpan is local ...
5 years, 9 months ago (2015-03-15 17:57:58 UTC) #7
sof
On 2015/03/15 17:57:58, pfeldman wrote: > > We need to keep it alive from the ...
5 years, 9 months ago (2015-03-15 19:19:10 UTC) #8
pfeldman
>> I'm just trying to do the codebase a favor, Oilpan or not. Sorry, it ...
5 years, 9 months ago (2015-03-15 19:40:38 UTC) #9
haraken
On 2015/03/15 17:57:58, pfeldman wrote: > > We need to keep it alive from the ...
5 years, 9 months ago (2015-03-15 23:41:34 UTC) #10
sof
5 years, 9 months ago (2015-03-20 09:20:32 UTC) #11
On 2015/03/15 23:41:34, haraken wrote:
> On 2015/03/15 17:57:58, pfeldman wrote:
> > > We need to keep it alive from the renderer side, but Oilpan is local to
> Blink
> > > and will not trace anything kept by the embedder. Which is why the
> > > WebPrivatePtr<> is introduced here, so as to be workable with & without
> > Oilpan.
> > > It takes care of the Blink finalization details for the embedder.
> > 
> > Is the amount of the code and complexity added justified though? We've lived
> > without that code before, why do we need it now?
> > 
> > > If we don't account for these raw pointers properly, besides the safety
> issue,
> > 
> > Could you elaborate on the safety risks or link to a bug that is currently
> > present?
> > 
> > > it prevents moving to a garbage collector infrastructure that supports
> movable
> > > objects, for instance.
> > 
> > Could you elaborate on what this means? You are throwing the
> > RefCountedWillBeGarbageCollectedFinalized + WebPrivatePtr complexity at the
> code
> > maintainers and I'd like to make sure it is justified. In either case, the
> > WebDevToolsFrontend that embeds  WebDevToolsFrontendPrivate that inherits
from
> > WebDevToolsFrontendImpl needs to be explained in the great detail in the
> > comments. I had an interface facing public/web along with its
implementation,
> > now my interface is a concrete class and there is a private layer in the
> middle.
> > If that is something that happens to the entire public/web layer inevitably,
> I'd
> > like to see a design doc explaining the generic approach.
> 
> I agree that this CL is adding complexity to WebDevToolsFrontend.h, but at
least
> this CL makes WebDevToolsFrontend.h consistent with other web/ classes. The CL
> looks reasonable to me.
> 
> I guess the underlying problem is the complexity of the content/core/web
> dependency (rather than Oilpan). I'm planning to write a design doc of the
> dependency reorganization after the repository merge this week. In that world,
> WebPrivatePtr will be gone, hopefully.

If there is a simpler/more-compliant way to handle the keepalive reference back
to WebDevToolsFrontendImpl, then please let me know.

Powered by Google App Engine
This is Rietveld 408576698