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

Issue 1138643010: Fix a race where backgroud page might ack an event before we're ready (Closed)

Created:
5 years, 7 months ago by lazyboy
Modified:
5 years, 7 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

Fix a race where backgroud page might ack an event before we're ready to receive the ack on browser/. We perform a sanity check upon background page ACKing an event, by checking whether the ACKed message is expected to be ACKed. We store the pending ACK message IDs into a set |unacked_messages_|, but due to PostTask call to IncrementInFlightEventsOnUI, the event ack might arrive earlier than storing the pending message's ID. This results in incorectly kill the renderer process. BUG=485440, 473821 Test=Rise Vision chrome app shouldn't crash anymore. Committed: https://crrev.com/b2eaaaf0e87f56751783dbc6cab13827375ce847 Cr-Commit-Position: refs/heads/master@{#330301}

Patch Set 1 #

Total comments: 2

Patch Set 2 : address comments #

Total comments: 2

Patch Set 3 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -5 lines) Patch
M extensions/browser/event_router.cc View 1 2 1 chunk +12 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
lazyboy
5 years, 7 months ago (2015-05-15 21:13:57 UTC) #2
not at google - send to devlin
https://codereview.chromium.org/1138643010/diff/1/extensions/browser/event_router.cc File extensions/browser/event_router.cc (right): https://codereview.chromium.org/1138643010/diff/1/extensions/browser/event_router.cc#newcode665 extensions/browser/event_router.cc:665: if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { For a function called "...OnUI" this ...
5 years, 7 months ago (2015-05-15 21:18:07 UTC) #3
lazyboy
https://codereview.chromium.org/1138643010/diff/1/extensions/browser/event_router.cc File extensions/browser/event_router.cc (right): https://codereview.chromium.org/1138643010/diff/1/extensions/browser/event_router.cc#newcode665 extensions/browser/event_router.cc:665: if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { On 2015/05/15 21:18:07, kalman wrote: > ...
5 years, 7 months ago (2015-05-15 21:29:53 UTC) #4
not at google - send to devlin
Ok, sgtm.
5 years, 7 months ago (2015-05-15 21:31:11 UTC) #5
lazyboy
Well, my git cl upload hung, now uploaded. Patch Set #2.
5 years, 7 months ago (2015-05-15 21:53:38 UTC) #6
not at google - send to devlin
lgtm https://chromiumcodereview.appspot.com/1138643010/diff/20001/extensions/browser/event_router.cc File extensions/browser/event_router.cc (right): https://chromiumcodereview.appspot.com/1138643010/diff/20001/extensions/browser/event_router.cc#newcode159 extensions/browser/event_router.cc:159: BrowserThread::PostTask( comment when this is the case, what ...
5 years, 7 months ago (2015-05-15 21:55:29 UTC) #7
lazyboy
https://chromiumcodereview.appspot.com/1138643010/diff/20001/extensions/browser/event_router.cc File extensions/browser/event_router.cc (right): https://chromiumcodereview.appspot.com/1138643010/diff/20001/extensions/browser/event_router.cc#newcode159 extensions/browser/event_router.cc:159: BrowserThread::PostTask( On 2015/05/15 21:55:29, kalman wrote: > comment when ...
5 years, 7 months ago (2015-05-16 00:07:43 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1138643010/40001
5 years, 7 months ago (2015-05-16 03:00:41 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-16 03:51:19 UTC) #13
Chirantan Ekbote
lgtm
5 years, 7 months ago (2015-05-16 18:06:46 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1138643010/40001
5 years, 7 months ago (2015-05-17 04:39:34 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 7 months ago (2015-05-17 06:15:36 UTC) #17
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:32:30 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b2eaaaf0e87f56751783dbc6cab13827375ce847
Cr-Commit-Position: refs/heads/master@{#330301}

Powered by Google App Engine
This is Rietveld 408576698