|
|
Chromium Code Reviews|
Created:
5 years, 3 months ago by peria Modified:
5 years, 3 months ago CC:
blink-reviews, caseq+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+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. |
DescriptionIt is not good to keep a raw pointer to an on heap WebLocalFrameImpl
as a member variable of WebDevToolsFrontendImpl on Oilpan build.
This CL adds a GC_PLUGIN_IGNORE with a TODO comment
to notify this issue.
BUG=509911
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201386
Patch Set 1 #
Total comments: 1
Patch Set 2 : Revert and put TODO comment #Messages
Total messages: 17 (5 generated)
peria@chromium.org changed reviewers: + oilpan-reviews@chromium.org
PTL.
haraken@chromium.org changed reviewers: + haraken@chromium.org, sigbjornf@opera.com
Sigbjorn: I need your brain :) Any advice on this? https://codereview.chromium.org/1322513002/diff/1/Source/web/WebDevToolsFront... File Source/web/WebDevToolsFrontendImpl.h (right): https://codereview.chromium.org/1322513002/diff/1/Source/web/WebDevToolsFront... Source/web/WebDevToolsFrontendImpl.h:65: RawPtrWillBeWeakPersistent<WebLocalFrameImpl> m_webFrame; This pointer looks nasty... - We shouldn't use WeakPersistent for a pointer that doesn't have a weak semantics (m_webFrame is a strong back pointer to the LocalFrameImpl). Thus we shouldn't use a WeakPersistent here. - It is not easy to move WebDevToolsFrontendImpl to the heap and use Member, because the WebDevToolsFrontendImpl is passed over to the chromium side. - In the first place, it's not clear to me why the raw m_webFrame pointer is safe. How is it guaranteed that the raw pointer doesn't become stale?
Yes, it looked like there is an implicit assumption/dependency on overall lifetime of m_webFrame wrt when it is last accessed by WebDevToolsFrontendImpl to keep the current raw pointer safe, when I looked at doing something more comprehensive here some time ago. But I might be forgetting (or not know :) ) a detail or two. cf. https://codereview.chromium.org/1008163003/
On 2015/08/27 09:31:38, sof wrote: > Yes, it looked like there is an implicit assumption/dependency on overall > lifetime of m_webFrame wrt when it is last accessed by WebDevToolsFrontendImpl > to keep the current raw pointer safe, when I looked at doing something more > comprehensive here some time ago. But I might be forgetting (or not know :) ) a > detail or two. > > cf. https://codereview.chromium.org/1008163003/ Thanks, your solution sounds reasonable to me. Until it is accepted, it would make sense to add GC_PLUGIN_IGNORE onto the raw pointer.
On 2015/08/27 09:37:34, haraken wrote: > On 2015/08/27 09:31:38, sof wrote: > > Yes, it looked like there is an implicit assumption/dependency on overall > > lifetime of m_webFrame wrt when it is last accessed by WebDevToolsFrontendImpl > > to keep the current raw pointer safe, when I looked at doing something more > > comprehensive here some time ago. But I might be forgetting (or not know :) ) > a > > detail or two. > > > > cf. https://codereview.chromium.org/1008163003/ > > Thanks, your solution sounds reasonable to me. > > Until it is accepted, it would make sense to add GC_PLUGIN_IGNORE onto the raw > pointer. A GC_PLUGIN_IGNORE() + TODO seems in order over WeakPersistent<>.
Reverted, and put a TODO comment.
lgtm
LGTM
The CQ bit was checked by peria@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1322513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1322513002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by peria@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1322513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1322513002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=201386 |
