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

Issue 8857004: Delete UDPClientSocket on same thread as creation. Also refactor. (Closed)

Created:
9 years ago by miket_OOO
Modified:
9 years ago
CC:
chromium-reviews, jstritar+watch_chromium.org, Aaron Boodman, mihaip+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Delete UDPClientSocket on same thread as creation. Also refactor. I investigated deriving from IOThreadExtensionFunction, but we need access to Profile in the midst of our work. Deriving from UIThreadExtensionFunction appears to be the right way to do that. It's possible that we'll want to address performance issues caused by jumping back and forth between threads, but for now this seems to work well enough. See http://code.google.com/p/chromium/issues/detail?id=106802 for future plans to deal with lifetime more elegantly. Also reapply http://codereview.chromium.org/8819029/, which is what led to this bug/fix. BUG=106656 TEST=no new ones; just refactoring. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113710

Patch Set 1 : Initial. #

Total comments: 5

Patch Set 2 : aa-inspired deltas. #

Total comments: 2

Patch Set 3 : Use DeleteTask<>(). #

Patch Set 4 : Changes suggested by trybots. #

Patch Set 5 : Merge to fix hunk failure. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -221 lines) Patch
M chrome/browser/extensions/api/socket/socket_api.h View 1 2 3 4 chunks +43 lines, -40 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.cc View 3 chunks +53 lines, -119 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api_controller.h View 1 3 chunks +7 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api_controller.cc View 1 3 chunks +8 lines, -13 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api_controller_unittest.cc View 3 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 4 chunks +11 lines, -1 line 0 comments Download
M tools/heapcheck/suppressions.txt View 1 2 3 4 1 chunk +0 lines, -14 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
miket_OOO
9 years ago (2011-12-07 22:09:37 UTC) #1
Aaron Boodman
As I mentioned on IRC, I'm suspicious of any object with Profile's lifetime. It usually ...
9 years ago (2011-12-07 23:16:22 UTC) #2
miket_OOO
Made changes (except the DeleteSoon one), uploaded. http://codereview.chromium.org/8857004/diff/3001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/8857004/diff/3001/chrome/browser/extensions/extension_service.cc#newcode486 chrome/browser/extensions/extension_service.cc:486: void ExtensionService::DeleteSocketController( ...
9 years ago (2011-12-08 00:29:21 UTC) #3
Aaron Boodman
http://codereview.chromium.org/8857004/diff/3001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/8857004/diff/3001/chrome/browser/extensions/extension_service.cc#newcode486 chrome/browser/extensions/extension_service.cc:486: void ExtensionService::DeleteSocketController( On 2011/12/08 00:29:22, miket wrote: > On ...
9 years ago (2011-12-08 00:41:50 UTC) #4
Aaron Boodman
lgtm http://codereview.chromium.org/8857004/diff/6001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/8857004/diff/6001/chrome/browser/extensions/extension_service.cc#newcode478 chrome/browser/extensions/extension_service.cc:478: // APIControllerController (still working on that name). FYI, ...
9 years ago (2011-12-08 00:43:20 UTC) #5
asargent_no_longer_on_chrome
lgtm As noted in person, it's slightly unusual to construct SocketController on the UI thread ...
9 years ago (2011-12-08 01:00:05 UTC) #6
miket_OOO
> Oh, whoops. I was thinking of DeleteTask from base/task.h (which DeleteSoon > uses). Gotcha. ...
9 years ago (2011-12-08 01:00:44 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/8857004/14001
9 years ago (2011-12-08 20:17:41 UTC) #8
commit-bot: I haz the power
Can't apply patch for file tools/heapcheck/suppressions.txt. While running patch -p1 --forward --force; patching file tools/heapcheck/suppressions.txt ...
9 years ago (2011-12-08 20:17:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/8857004/10003
9 years ago (2011-12-08 20:40:41 UTC) #10
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years ago (2011-12-08 22:02:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/8857004/10003
9 years ago (2011-12-08 22:04:58 UTC) #12
commit-bot: I haz the power
9 years ago (2011-12-09 00:40:22 UTC) #13
Change committed as 113710

Powered by Google App Engine
This is Rietveld 408576698