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

Issue 555823002: Add __contains__ implementation to avoid a race in __get_item__. (Closed)

Created:
6 years, 3 months ago by achuithb
Modified:
6 years, 3 months ago
Reviewers:
nednguyen, tonyg, tbarzic
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add __contains__ implementation to avoid a race in __get_item__. __get_item__ enumerates ExtensionBackendList, and when it discovers a matching index, it access ExtensionBackendList at that index. However, ExtensionBackendList.__get_item__ calls Update, which can invalidate index. BUG=411612 TEST=extension_unittest Committed: https://crrev.com/a91527a67047664d5f13bbb1ae7533b9f85e2b14 Cr-Commit-Position: refs/heads/master@{#293944}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M tools/telemetry/telemetry/core/backends/chrome/extension_backend.py View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
achuithb
Please review, Toni and Ned
6 years, 3 months ago (2014-09-09 11:44:38 UTC) #2
tonyg
lgtm
6 years, 3 months ago (2014-09-09 14:40:39 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/achuith@chromium.org/555823002/1
6 years, 3 months ago (2014-09-09 14:41:29 UTC) #6
nednguyen
Sorry, can you explain how adding __contains__ help avoid the race condition mentioned? I don't ...
6 years, 3 months ago (2014-09-09 15:29:17 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as 9a6b0abb16d995ff17e533874e6787b788cc7129
6 years, 3 months ago (2014-09-09 15:41:59 UTC) #8
tbarzic
On 2014/09/09 15:41:59, I haz the power (commit-bot) wrote: > Committed patchset #1 (id:1) as ...
6 years, 3 months ago (2014-09-09 16:52:28 UTC) #9
achuithb
On 2014/09/09 16:52:28, tbarzic wrote: > On 2014/09/09 15:41:59, I haz the power (commit-bot) wrote: ...
6 years, 3 months ago (2014-09-09 23:09:29 UTC) #10
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:53:32 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/a91527a67047664d5f13bbb1ae7533b9f85e2b14
Cr-Commit-Position: refs/heads/master@{#293944}

Powered by Google App Engine
This is Rietveld 408576698