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

Issue 22900005: Fixing race conditions in chrome.alarms (Closed)

Created:
7 years, 4 months ago by vadimt
Modified:
7 years, 2 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Fixing race conditions in chrome.alarms. This fix makes all alarms operations wait till alarms data is loaded from storage. Also fixing a bug in scheduling. BUG=236684 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217750

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+427 lines, -203 lines) Patch
M chrome/browser/extensions/api/alarms/alarm_manager.h View 6 chunks +73 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/alarms/alarm_manager.cc View 8 chunks +100 lines, -44 lines 0 comments Download
M chrome/browser/extensions/api/alarms/alarms_api.h View 4 chunks +20 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/alarms/alarms_api.cc View 4 chunks +40 lines, -18 lines 0 comments Download
M chrome/browser/extensions/api/alarms/alarms_api_unittest.cc View 13 chunks +194 lines, -113 lines 0 comments Download
M chrome/renderer/resources/extensions/last_error.js View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
vadimt
mpcomplete@, please provide OWNER's approval. The exact delta between this change and the first fix ...
7 years, 4 months ago (2013-08-15 00:50:44 UTC) #1
Matt Perry
Thanks for uploading the delta, too. LGTM
7 years, 4 months ago (2013-08-15 00:54:47 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vadimt@chromium.org/22900005/1
7 years, 4 months ago (2013-08-15 01:05:46 UTC) #3
commit-bot: I haz the power
Change committed as 217750
7 years, 4 months ago (2013-08-15 05:45:59 UTC) #4
benwells
On 2013/08/15 05:45:59, I haz the power (commit-bot) wrote: > Change committed as 217750 Sorry ...
7 years, 2 months ago (2013-10-23 04:07:28 UTC) #5
vadimt
7 years, 2 months ago (2013-10-23 16:03:51 UTC) #6
Message was sent while issue was closed.
On 2013/10/23 04:07:28, benwells wrote:
> On 2013/08/15 05:45:59, I haz the power (commit-bot) wrote:
> > Change committed as 217750
> 
> Sorry to ask on such an old CL - but was the change to
> chrome/renderer/resources/extensions/last_error.js intentional? It seems
> unrelated to the description. This makes API errors no longer get logged to
the
> console.

Yes, this was intentional. This popped up during discussions about the main fix.
It's a normal practice, for example, to attempt to delete an alarm that doesn't
exist. This is useful when you want to kill an alarm, but don't know whether it
exists. The developer of the extension that does this should't be penalized by
red outputs in their Dev Tools console.
The bottom line is that an "error" from API doesn't always mean an error in the
application. If this is the case, the app is supposed to add its own error
output.

Powered by Google App Engine
This is Rietveld 408576698