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

Issue 16007009: Remove all but one use of WeakPtrFactory::DetachFromThread (Closed)

Created:
7 years, 6 months ago by Wez
Modified:
7 years, 6 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, cbentzel+watch_chromium.org, hclam+watch_chromium.org, sergeyu+watch_chromium.org, amit, sanjeevr, jam, gavinp+memory_chromium.org, apatrick_chromium, garykac+watch_chromium.org, Aaron Boodman, lambroslambrou+watch_chromium.org, stuartmorgan+watch_chromium.org, weitaosu+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, alexeypa+watch_chromium.org, erikwright+watch_chromium.org, wez+watch_chromium.org, rmsousa+watch_chromium.org, greggman
Visibility:
Public.

Description

Remove all but one use of WeakPtrFactory::DetachFromThread. This is a re-land of issue 14299011, which broke GLSurfaceGLX, in turn breaking Chrome Linux/Aura. This CL changes WeakPtr in the following ways: * Changes thread-bindings semantics so that WeakPtrs only become bound when the first one is dereferenced, or the owning factory invalidates them. * Removes WeakPtrFactory::DetachFromThread. * Renames SupportsWeakPtr::DetachFromThread to DetachFromThreadHack. Calling code changes to allow this: * Unnecessary use of SupportsWeakPtr removed from SGIVideoSyncProviderThreadShim. * Unnecessary DetachFromThread() calls removed from PluginInfoMessageFilter, DhcpProxyScript[Adapter]FetcherWin and (Chromoting's) PolicyWatcherLinux. * DetachFromThread() calls rendered unnecessary by change in binding semantics removed from IOThread, SearchProviderInstallData, RuleRegistryWithCache and GLSurfaceGlx. WebGraphicsContext3DInProcessCommandBufferImpl uses the re-named DetachFromThreadHack() - bug 234964 tracks work to remove that use. TBR=darin,awong BUG=232143, 234964, 243914 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202811

Patch Set 1 #

Patch Set 2 : Simplify SGIVideoSyncProviderThreadShim ownership, removing unnecessary use of SupportsWeakPtr. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -100 lines) Patch
M base/memory/weak_ptr.h View 7 chunks +27 lines, -28 lines 0 comments Download
M base/memory/weak_ptr.cc View 2 chunks +10 lines, -4 lines 0 comments Download
M base/memory/weak_ptr_unittest.cc View 6 chunks +52 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/search_provider_install_data.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M remoting/host/policy_hack/policy_watcher_linux.cc View 2 chunks +5 lines, -7 lines 0 comments Download
M ui/gl/gl_surface_glx.cc View 1 8 chunks +20 lines, -22 lines 0 comments Download
M webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M win8/test/ui_automation_client.cc View 1 chunk +1 line, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Wez
FYI - original CL broke SGIVideoSyncProviderThreadShim's use of WeakPtr, which wasn't necessary anyway, since the ...
7 years, 6 months ago (2013-05-29 02:19:53 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wez@chromium.org/16007009/2001
7 years, 6 months ago (2013-05-29 02:20:37 UTC) #2
darin (slow to review)
LGTM
7 years, 6 months ago (2013-05-29 04:35:06 UTC) #3
commit-bot: I haz the power
7 years, 6 months ago (2013-05-29 08:04:35 UTC) #4
Message was sent while issue was closed.
Change committed as 202811

Powered by Google App Engine
This is Rietveld 408576698