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

Issue 2051573003: Perform alarm's period limit check while reading alarm info from StateStore. (Closed)

Created:
4 years, 6 months ago by lazyboy
Modified:
4 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Perform alarm's period limit check while reading alarm info from StateStore. We used to only check for the minimum allowable period length in chrome.alarms.create(). This CL also adds that check when alarms are read through StateStore. This CL stores alarm.minimum_granularity to make sure we do not poll more frequently than that granularity. Because already stored (before this CL) alarms in StateStore won't have minimum_granularity set, fall back to a relaxed minimum_granularity in those cases (kDevDelayMinimum). This CL also bumps up the minimum allowed period (kDevDelayMinimum) for unpacked extensions from 0s to ~1s. The rationale is that using a 0s period can result in very high browser memory usage very quickly. For example, in test, I could make the browser/ process take up to 10GB of memory within 30s of browser run. BUG=618540 Test=See bug description for repro case. Committed: https://crrev.com/65f4c296239324342751425ce8f16dbe4a07034b Cr-Commit-Position: refs/heads/master@{#399360}

Patch Set 1 #

Patch Set 2 : reuse #

Patch Set 3 : typo #

Total comments: 2

Patch Set 4 : address comments from Antony #

Patch Set 5 : git cl format #

Total comments: 2

Patch Set 6 : move warning messages to alarms_api_constants.cc #

Patch Set 7 : rebase @tott #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -39 lines) Patch
M extensions/browser/api/alarms/alarm_manager.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/browser/api/alarms/alarm_manager.cc View 1 2 3 4 5 5 chunks +22 lines, -7 lines 0 comments Download
M extensions/browser/api/alarms/alarms_api.cc View 1 2 3 4 5 4 chunks +24 lines, -32 lines 0 comments Download
A extensions/browser/api/alarms/alarms_api_constants.h View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download
A extensions/browser/api/alarms/alarms_api_constants.cc View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
M extensions/browser/api/alarms/alarms_api_unittest.cc View 1 2 3 4 2 chunks +60 lines, -0 lines 0 comments Download
M extensions/extensions.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
lazyboy
Sending the CL out, it didn't turn out as trivial as I have hoped. /cc ...
4 years, 6 months ago (2016-06-09 02:43:49 UTC) #2
Devlin
On 2016/06/09 02:43:49, lazyboy wrote: > Sending the CL out, it didn't turn out as ...
4 years, 6 months ago (2016-06-09 17:05:00 UTC) #3
lazyboy
On 2016/06/09 17:05:00, Devlin wrote: > On 2016/06/09 02:43:49, lazyboy wrote: > > Sending the ...
4 years, 6 months ago (2016-06-09 17:53:30 UTC) #4
asargent_no_longer_on_chrome
Devlin's question about having very large numbers of registered alarms seems like a good additional ...
4 years, 6 months ago (2016-06-09 19:44:57 UTC) #5
lazyboy
Antony: Devlin's question about having very large numbers of registered alarms .... Let's tackle that ...
4 years, 6 months ago (2016-06-09 22:00:21 UTC) #6
asargent_no_longer_on_chrome
lgtm https://codereview.chromium.org/2051573003/diff/80001/extensions/browser/api/alarms/alarms_api.cc File extensions/browser/api/alarms/alarms_api.cc (left): https://codereview.chromium.org/2051573003/diff/80001/extensions/browser/api/alarms/alarms_api.cc#oldcode56 extensions/browser/api/alarms/alarms_api.cc:56: "warning message must be updated"); optional: I see ...
4 years, 6 months ago (2016-06-10 00:07:33 UTC) #7
lazyboy
https://codereview.chromium.org/2051573003/diff/80001/extensions/browser/api/alarms/alarms_api.cc File extensions/browser/api/alarms/alarms_api.cc (left): https://codereview.chromium.org/2051573003/diff/80001/extensions/browser/api/alarms/alarms_api.cc#oldcode56 extensions/browser/api/alarms/alarms_api.cc:56: "warning message must be updated"); On 2016/06/10 00:07:33, Antony ...
4 years, 6 months ago (2016-06-10 20:01:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2051573003/120001
4 years, 6 months ago (2016-06-11 02:47:09 UTC) #11
commit-bot: I haz the power
Failed to apply the patch.
4 years, 6 months ago (2016-06-11 03:32:13 UTC) #13
commit-bot: I haz the power
4 years, 6 months ago (2016-06-11 03:33:15 UTC) #15
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/65f4c296239324342751425ce8f16dbe4a07034b
Cr-Commit-Position: refs/heads/master@{#399360}

Powered by Google App Engine
This is Rietveld 408576698