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

Issue 1987583002: Fix race in ShellConnectionRef (Closed)

Created:
4 years, 7 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race in ShellConnectionRef When a ShellConnectionRef is Cloned it may post a task to the factory's thread to add a ref. This can race with the ref-count going to zero and the factory being deleted. This CL changes ShellConnectionRef to hold a WeakPtr to the factory to avoid the race. This means it's possible for a ShellConnectionRef to be acquired without keeping the ShellClient alive (because AddRef will never run), which is a problem. But it's less of a problem than crashing, for now. BUG=612332 R=ben@chromium.org Committed: https://crrev.com/422c8bdec8d814af792916dbff086350a286c54f Cr-Commit-Position: refs/heads/master@{#394049}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -34 lines) Patch
M services/shell/public/cpp/lib/shell_connection_ref.cc View 3 chunks +22 lines, -34 lines 0 comments Download
M services/shell/public/cpp/shell_connection_ref.h View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
Ken Rockot(use gerrit already)
4 years, 7 months ago (2016-05-17 02:49:38 UTC) #3
Ben Goodger (Google)
lgtm
4 years, 7 months ago (2016-05-17 03:09:31 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1987583002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1987583002/1
4 years, 7 months ago (2016-05-17 03:12:25 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-17 04:37:06 UTC) #7
commit-bot: I haz the power
4 years, 7 months ago (2016-05-17 04:39:36 UTC) #9
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/422c8bdec8d814af792916dbff086350a286c54f
Cr-Commit-Position: refs/heads/master@{#394049}

Powered by Google App Engine
This is Rietveld 408576698