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

Issue 2341503002: Fix race condition causing DCHECK(ack_pending_) to trip. (Closed)

Created:
4 years, 3 months ago by dmazzoni
Modified:
4 years, 3 months ago
Reviewers:
Tom Sepez, David Tseng, jam
CC:
aboxhall+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, je_julie, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race condition causing DCHECK(ack_pending_) to trip. If RenderFrameImpl deletes a RenderAccessibilityImpl and then recreates another one very quickly, that second RenderAccessibilityImpl can get confused when it receives an ACK intended for the previous instance. Fix this by passing an ACK token from the renderer to browser and ignoring messages with the wrong token. This only caused issues when DCHECKs are enabled. BUG=646588 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/50aa111be5288fbc06b54e09d2cafd4dd294a315 Cr-Commit-Position: refs/heads/master@{#418902}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase #

Patch Set 3 : Fix typo #

Patch Set 4 : Rebase #

Patch Set 5 : Update test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -13 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M content/common/accessibility_messages.h View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.cc View 1 2 3 4 chunks +14 lines, -2 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (21 generated)
dmazzoni
4 years, 3 months ago (2016-09-13 21:09:54 UTC) #4
Tom Sepez
Messages LGTM with nit but bots are red. https://codereview.chromium.org/2341503002/diff/1/content/common/accessibility_messages.h File content/common/accessibility_messages.h (right): https://codereview.chromium.org/2341503002/diff/1/content/common/accessibility_messages.h#newcode184 content/common/accessibility_messages.h:184: // ...
4 years, 3 months ago (2016-09-13 21:31:49 UTC) #8
David Tseng
lgtm https://codereview.chromium.org/2341503002/diff/1/content/renderer/accessibility/render_accessibility_impl.cc File content/renderer/accessibility/render_accessibility_impl.cc (right): https://codereview.chromium.org/2341503002/diff/1/content/renderer/accessibility/render_accessibility_impl.cc#newcode88 content/renderer/accessibility/render_accessibility_impl.cc:88: ack_token_ = g_next_ack_token++; Perhaps dumb question, but is ...
4 years, 3 months ago (2016-09-14 02:49:42 UTC) #9
dmazzoni
https://codereview.chromium.org/2341503002/diff/1/content/renderer/accessibility/render_accessibility_impl.cc File content/renderer/accessibility/render_accessibility_impl.cc (right): https://codereview.chromium.org/2341503002/diff/1/content/renderer/accessibility/render_accessibility_impl.cc#newcode88 content/renderer/accessibility/render_accessibility_impl.cc:88: ack_token_ = g_next_ack_token++; On 2016/09/14 at 02:49:42, David Tseng ...
4 years, 3 months ago (2016-09-14 18:58:04 UTC) #10
dmazzoni
Bots were red due to patch failure. Should be ready to go if CQ passes, ...
4 years, 3 months ago (2016-09-14 18:59:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2341503002/40001
4 years, 3 months ago (2016-09-14 19:00:33 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/30643) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-14 19:04:30 UTC) #16
dmazzoni
+jam for content/browser/frame_host
4 years, 3 months ago (2016-09-14 20:37:33 UTC) #20
jam
lgtm
4 years, 3 months ago (2016-09-15 16:24:40 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2341503002/80001
4 years, 3 months ago (2016-09-15 17:53:21 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-15 17:59:29 UTC) #31
commit-bot: I haz the power
4 years, 3 months ago (2016-09-15 18:01:05 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/50aa111be5288fbc06b54e09d2cafd4dd294a315
Cr-Commit-Position: refs/heads/master@{#418902}

Powered by Google App Engine
This is Rietveld 408576698