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

Issue 1459343003: Have GeolocationServiceImpl refer to RFHI via a weak pointer (Closed)

Created:
5 years, 1 month ago by blundell
Modified:
4 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mlamouri (slow - plz ping), nasko+codewatch_chromium.org, ncarter (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Have GeolocationServiceImpl refer to RFHI via a weak pointer GeolocationServiceImpl's lifetime is conceptually the same as its containing RenderFrameHostImpl, as the former is destroyed when it receives a message that the pipe to the renderer has been closed (which occurs when the RenderFrame is destroyed). However, there's no actual guaranteed ordering between GeolocationServiceImpl receiving that message and the RenderFrameHostImpl being destroyed, leading to a potential race at shutdown wherein GeolocationServiceImpl calls back into RenderFrameHostImpl after it's been destroyed. This CL handles the race condition by giving GeolocationServiceImpl a WeakPtr to RenderFrameHostImpl rather than a raw pointer. BUG=556749 Committed: https://crrev.com/33dd166ed31bc6ed3a534f50a989eb57fa3ab465 Cr-Commit-Position: refs/heads/master@{#377878}

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +7 lines, -1 line 8 comments Download

Messages

Total messages: 27 (10 generated)
blundell
creis: for OWNERS. rockot: in case you've thought of any other way to deal with ...
5 years, 1 month ago (2015-11-20 11:08:11 UTC) #2
Ken Rockot(use gerrit already)
This CL may be of interest to you: https://codereview.chromium.org/1411063007 In general though another approach to ...
5 years, 1 month ago (2015-11-20 14:04:01 UTC) #4
blundell
On 2015/11/20 14:04:01, Ken Rockot wrote: > This CL may be of interest to you: ...
5 years, 1 month ago (2015-11-20 14:08:45 UTC) #5
blundell
Charlie, resurrecting this CL as https://codereview.chromium.org/1411063007/ is stalled. Thanks!
4 years, 10 months ago (2016-02-18 08:19:57 UTC) #7
Michael van Ouwerkerk
Thanks Colin! drive-by lgtm for what it's worth https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1704 content/browser/frame_host/render_frame_host_impl.cc:1704: // ...
4 years, 10 months ago (2016-02-18 09:37:57 UTC) #9
Charlie Reis
[CC'ing Nick, who has thought about these lifetime issues as well.] https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): ...
4 years, 10 months ago (2016-02-18 22:51:16 UTC) #10
ncarter (slow)
https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1709 content/browser/frame_host/render_frame_host_impl.cc:1709: weak_ptr_factory_.GetWeakPtr()))); The RenderFrameHostImpl owns the ServiceRegistry, so I am ...
4 years, 10 months ago (2016-02-19 00:44:36 UTC) #12
ncarter (slow)
https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1709 content/browser/frame_host/render_frame_host_impl.cc:1709: weak_ptr_factory_.GetWeakPtr()))); On 2016/02/19 00:44:36, ncarter wrote: > The RenderFrameHostImpl ...
4 years, 10 months ago (2016-02-19 23:09:44 UTC) #13
ncarter (slow)
Let's land this? Charlie?
4 years, 10 months ago (2016-02-25 20:55:13 UTC) #14
Charlie Reis
LGTM. https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1733 content/browser/frame_host/render_frame_host_impl.cc:1733: base::Unretained(this))); On 2016/02/18 22:51:16, Charlie Reis (slow til ...
4 years, 10 months ago (2016-02-25 21:00:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1459343003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1459343003/1
4 years, 10 months ago (2016-02-25 21:08:37 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/29198)
4 years, 10 months ago (2016-02-25 21:49:25 UTC) #19
blundell
Apologies for the delayed response. https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1709 content/browser/frame_host/render_frame_host_impl.cc:1709: weak_ptr_factory_.GetWeakPtr()))); On 2016/02/19 23:09:44, ...
4 years, 10 months ago (2016-02-26 12:32:50 UTC) #20
blundell
https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1459343003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#newcode1704 content/browser/frame_host/render_frame_host_impl.cc:1704: // pointer. On 2016/02/18 09:37:57, Michael van Ouwerkerk wrote: ...
4 years, 10 months ago (2016-02-26 12:34:12 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1459343003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1459343003/1
4 years, 10 months ago (2016-02-26 12:34:35 UTC) #23
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-26 13:51:35 UTC) #25
commit-bot: I haz the power
4 years, 10 months ago (2016-02-26 13:52:42 UTC) #27
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/33dd166ed31bc6ed3a534f50a989eb57fa3ab465
Cr-Commit-Position: refs/heads/master@{#377878}

Powered by Google App Engine
This is Rietveld 408576698