Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 9447042: Change the way lazy background pages shutdown. (Closed)

Created:
8 years, 10 months ago by Matt Perry
Modified:
8 years, 10 months ago
Reviewers:
Yoyo Zhou
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, mihaip+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Change the way lazy background pages shutdown. The browser process now keeps a generic count of activity from the lazy background page. This will be used for all types of activity, such as outstanding events, resource requests, and API calls. BUG=81752 TEST=no Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=123821

Patch Set 1 #

Patch Set 2 : rm unused crud #

Patch Set 3 : compile fix #

Patch Set 4 : . #

Patch Set 5 : fixed test failure #

Total comments: 8

Patch Set 6 : add checks #

Total comments: 3

Patch Set 7 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -97 lines) Patch
M chrome/browser/extensions/extension_event_router.h View 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_event_router.cc View 1 2 3 4 5 6 5 chunks +26 lines, -17 lines 0 comments Download
M chrome/browser/extensions/extension_function.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_function.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 6 4 chunks +23 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 chunks +31 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_process_manager.h View 1 2 3 4 5 6 1 chunk +16 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 2 3 4 5 6 2 chunks +67 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/lazy_background_page_apitest.cc View 4 chunks +18 lines, -20 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 1 2 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 1 2 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.h View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 1 2 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/renderer/extensions/extension_helper.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Matt Perry
8 years, 10 months ago (2012-02-24 01:27:38 UTC) #1
Yoyo Zhou
http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_host.cc File chrome/browser/extensions/extension_host.cc (right): http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_host.cc#newcode407 chrome/browser/extensions/extension_host.cc:407: // TODO(mpcomplete): is this check really necessary? Well, the ...
8 years, 10 months ago (2012-02-24 20:25:12 UTC) #2
Matt Perry
http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_host.cc File chrome/browser/extensions/extension_host.cc (right): http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_host.cc#newcode407 chrome/browser/extensions/extension_host.cc:407: // TODO(mpcomplete): is this check really necessary? On 2012/02/24 ...
8 years, 10 months ago (2012-02-24 22:51:27 UTC) #3
Yoyo Zhou
LGTM http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_process_manager.h File chrome/browser/extensions/extension_process_manager.h (right): http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/extension_process_manager.h#newcode96 chrome/browser/extensions/extension_process_manager.h:96: int GetLazyKeepaliveCount(const Extension* extension); On 2012/02/24 22:51:27, Matt ...
8 years, 10 months ago (2012-02-24 23:15:00 UTC) #4
Matt Perry
8 years, 10 months ago (2012-02-24 23:20:12 UTC) #5
http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/ex...
File chrome/browser/extensions/extension_process_manager.h (right):

http://codereview.chromium.org/9447042/diff/7001/chrome/browser/extensions/ex...
chrome/browser/extensions/extension_process_manager.h:96: int
GetLazyKeepaliveCount(const Extension* extension);
On 2012/02/24 23:15:00, Yoyo Zhou wrote:
> On 2012/02/24 22:51:27, Matt Perry wrote:
> > On 2012/02/24 20:25:12, Yoyo Zhou wrote:
> > > These names are a little unwieldy.
> > 
> > True... Any suggestions?
> > 
> > > Is the "lazy" necessary?
> > 
> > It only applies to lazy background pages. I suppose it's not necessary, but
I
> > think it adds clarity.
> 
> Yeah. But "lazy" (referring to not being created until necessary, which just
> happened to be the first part to be implemented) doesn't capture the whole
> picture either. I guess we can think of better names for this later.

"On-demand" is my favorite succinct name for the feature. But the code already
has lazy everywhere, so I just went with that. (And lazy's nice and short!)

> 
> > > I would spell it
> > > KeepAlive.
> > 
> > I was going for http://en.wikipedia.org/wiki/Keepalive
> 
> Sure. But it does seem more like reference counting to me. So, perhaps
something
> like "IncrementLazyReferenceCount". But we don't want to confuse it with
memory
> refcounting...

Yeah, that doesn't convey much about what we're counting, IMO.

Powered by Google App Engine
This is Rietveld 408576698