Chromium Code Reviews
DescriptionPerform 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 #
Messages
Total messages: 15 (5 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||