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

Issue 345051: Cleans up our autorelease handling so that we don't create a layered ... (Closed)

Created:
11 years, 1 month ago by dmac
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, pam+watch_chromium.org, brettw+cc_chromium.org
Visibility:
Public.

Description

Cleans up our autorelease pool handling by making sure that an autorelease pool isn't created while the app is handling an event sent via -[NSApp sendEvent]. Branches browser/chrome_application_mac into browser/chrome_browser_application and base/chrome_application. Renderers will run as chrome_applications, and browsers will run as chrome_browser_applications. BUG=26418, 25462, 25463, 25465 TEST=1) See bug 25857. 2) Start up. Open 3+ windows. 3)Quit. See bugs for other repro cases. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31135

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 17

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 5

Patch Set 7 : '' #

Total comments: 8

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 18

Patch Set 16 : '' #

Patch Set 17 : '' #

Total comments: 2

Patch Set 18 : '' #

Total comments: 29

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Total comments: 9

Patch Set 23 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -844 lines) Patch
M base/base.gyp View 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
A + base/chrome_application_mac.h View 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +26 lines, -28 lines 0 comments Download
A + base/chrome_application_mac.mm View 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +26 lines, -293 lines 0 comments Download
M base/message_pump_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 10 chunks +78 lines, -13 lines 2 comments Download
M chrome/app/app-Info.plist View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/browser_list.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/browser_main_mac.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -10 lines 0 comments Download
D chrome/browser/chrome_application_mac.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -42 lines 0 comments Download
D chrome/browser/chrome_application_mac.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -316 lines 0 comments Download
D chrome/browser/chrome_application_mac_unittest.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -81 lines 0 comments Download
A + chrome/browser/chrome_browser_application_mac.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +13 lines, -16 lines 0 comments Download
A + chrome/browser/chrome_browser_application_mac.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 chunks +10 lines, -17 lines 0 comments Download
A + chrome/browser/chrome_browser_application_mac_unittest.mm View 3 4 5 6 7 8 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/cocoa_test_helper.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/cocoa/cocoa_test_helper.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/renderer_main_platform_delegate_mac.mm View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
dmac
I thought the horse was dead, but obviously more whipping is/was required.
11 years, 1 month ago (2009-11-03 19:12:41 UTC) #1
Mark Mentovai
http://codereview.chromium.org/345051/diff/2001/3001 File base/message_pump_mac.h (right): http://codereview.chromium.org/345051/diff/2001/3001#newcode279 Line 279: // True if an event should be sent ...
11 years, 1 month ago (2009-11-03 19:49:36 UTC) #2
dmac
Horse was not responding well to whipping. Decided to use large stick instead. Sort of ...
11 years, 1 month ago (2009-11-04 22:02:10 UTC) #3
Mark Mentovai
I don't know if it's a good (or clean) idea to abuse MessageLoop in this ...
11 years, 1 month ago (2009-11-04 22:08:39 UTC) #4
dmaclach1
On Nov 4, 2009, at 2:08 PM, mark@chromium.org wrote: > I don't know if it's ...
11 years, 1 month ago (2009-11-04 22:29:13 UTC) #5
Mark Mentovai
dmac wrote: > I was keeping track of it in the app, but then that ...
11 years, 1 month ago (2009-11-04 22:31:29 UTC) #6
Scott Hess - ex-Googler
This seems awful intrusive. I don't understand things well enough to know for certain, but ...
11 years, 1 month ago (2009-11-04 23:31:38 UTC) #7
Scott Hess - ex-Googler
Nevermind, I think I'm going to go hide under my table or something. Just like ...
11 years, 1 month ago (2009-11-04 23:44:55 UTC) #8
Scott Hess - ex-Googler
http://codereview.chromium.org/345051/diff/8003/7006 File base/message_loop.h (right): http://codereview.chromium.org/345051/diff/8003/7006#newcode255 Line 255: #endif // OS_MACOSX Rather than putting this here, ...
11 years, 1 month ago (2009-11-05 00:11:24 UTC) #9
Mark Mentovai
http://codereview.chromium.org/345051/diff/6049/9053 File chrome/browser/chrome_browser_application_mac.mm (right): http://codereview.chromium.org/345051/diff/6049/9053#newcode136 Line 136: chrome_application_mac::ScopedSendingEvent scoper; I like the scoper better than ...
11 years, 1 month ago (2009-11-05 02:59:11 UTC) #10
dmac
I think I've taken care of all of Scott and Mark's comments. Please take another ...
11 years, 1 month ago (2009-11-05 06:53:37 UTC) #11
Scott Hess - ex-Googler
http://codereview.chromium.org/345051/diff/9093/9094 File base/message_pump_mac.mm (right): http://codereview.chromium.org/345051/diff/9093/9094#newcode16 Line 16: #import "base/chrome_application_mac.h" Sort these. http://codereview.chromium.org/345051/diff/9093/9094#newcode56 Line 56: // ...
11 years, 1 month ago (2009-11-05 07:54:19 UTC) #12
dmac
Updated with shess' comments http://codereview.chromium.org/345051/diff/9093/9094 File base/message_pump_mac.mm (right): http://codereview.chromium.org/345051/diff/9093/9094#newcode16 Line 16: #import "base/chrome_application_mac.h" On 2009/11/05 ...
11 years, 1 month ago (2009-11-05 17:54:52 UTC) #13
Scott Hess - ex-Googler
LGTM. http://codereview.chromium.org/345051/diff/6077/6078 File base/message_pump_mac.mm (right): http://codereview.chromium.org/345051/diff/6077/6078#newcode60 Line 60: [static_cast<CrApplication*>(NSApp) isHandlingSendEvent])) { Consider this non-blocking, as ...
11 years, 1 month ago (2009-11-05 18:48:33 UTC) #14
Mark Mentovai
http://codereview.chromium.org/345051/diff/6106/9135 File base/chrome_application_mac.h (right): http://codereview.chromium.org/345051/diff/6106/9135#newcode16 Line 16: @property(readonly, getter=isHandlingSendEvent) BOOL handlingSendEvent; Can this be nonatomic? ...
11 years, 1 month ago (2009-11-05 19:01:46 UTC) #15
dmac
http://codereview.chromium.org/345051/diff/6106/9135 File base/chrome_application_mac.h (right): http://codereview.chromium.org/345051/diff/6106/9135#newcode16 Line 16: @property(readonly, getter=isHandlingSendEvent) BOOL handlingSendEvent; On 2009/11/05 19:01:46, Mark ...
11 years, 1 month ago (2009-11-05 19:38:31 UTC) #16
Mark Mentovai
LGTM % a couple of nitty things. http://codereview.chromium.org/345051/diff/9157/9174 File base/chrome_application_mac.mm (right): http://codereview.chromium.org/345051/diff/9157/9174#newcode49 Line 49: } ...
11 years, 1 month ago (2009-11-05 19:53:40 UTC) #17
Mark Mentovai
Higher-level comment: this came out cleaner than I expected, and maybe cleaner than you expected ...
11 years, 1 month ago (2009-11-05 19:54:16 UTC) #18
dmac
Final (fingers crossed) cleanup for Mark. Awaiting the tree opening again. http://codereview.chromium.org/345051/diff/6077/6078 File base/message_pump_mac.mm (right): ...
11 years, 1 month ago (2009-11-05 20:22:04 UTC) #19
Mark Mentovai
Yes yes yes yes yes yes yes LGTM http://codereview.chromium.org/345051/diff/9179/9180 File base/message_pump_mac.mm (right): http://codereview.chromium.org/345051/diff/9179/9180#newcode36 Line 36: ...
11 years, 1 month ago (2009-11-05 20:28:39 UTC) #20
Scott Hess - ex-Googler
11 years, 1 month ago (2009-11-05 20:36:12 UTC) #21
LGTM!

http://codereview.chromium.org/345051/diff/9179/9180
File base/message_pump_mac.mm (right):

http://codereview.chromium.org/345051/diff/9179/9180#newcode38
Line 38: ~MessagePumpScopedAutoreleasePool() {
Nit: indentation.

Powered by Google App Engine
This is Rietveld 408576698