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

Issue 426063010: IndexedDB: Fixed threading bugs with use of AtomicStrings. (Closed)

Created:
6 years, 4 months ago by cmumford
Modified:
6 years, 4 months ago
Reviewers:
jsbell, abarth-chromium
CC:
alecflett, blink-reviews, dgrogan, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IndexedDB: Fixed threading bugs with use of AtomicStrings. Some IndexedDB classes (IDBCursor, IDBRequest, IDBTransaction, and IDBVersionChangeEvent) were using static local AtomicStrings on different threads. This is safe, as long as these static strings are properly created - which they were not. Switching to an initialization mechanism which mirrors the Core static strings fixes this. BUG=393728 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180205

Patch Set 1 #

Patch Set 2 : Switching more classes to wTF::String #

Patch Set 3 : Switched to proper code-generated static strings like Core creates them. #

Total comments: 8

Patch Set 4 : Commented names and removed bison build rule #

Total comments: 4

Patch Set 5 : Factored out module init cleanup from the actual bug fix. #

Patch Set 6 : Rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -113 lines) Patch
M Source/modules/BUILD.gn View 1 2 1 chunk +20 lines, -1 line 0 comments Download
M Source/modules/InitModules.cpp View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.h View 1 2 3 4 5 2 chunks +1 line, -7 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.cpp View 1 2 3 chunks +12 lines, -35 lines 0 comments Download
M Source/modules/indexeddb/IDBRequest.cpp View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBTransaction.h View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M Source/modules/indexeddb/IDBTransaction.cpp View 1 2 4 chunks +9 lines, -34 lines 0 comments Download
M Source/modules/indexeddb/IDBVersionChangeEvent.cpp View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
A Source/modules/indexeddb/IndexedDBNames.in View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
M Source/modules/indexeddb/InspectorIndexedDBAgent.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/modules.gyp View 1 2 2 chunks +1 line, -21 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A Source/modules/modules_generated.gyp View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
cmumford
6 years, 4 months ago (2014-07-31 22:49:26 UTC) #1
jsbell
Wow... (1) Is it even worth it to have members, vs. just `return "next"` where ...
6 years, 4 months ago (2014-07-31 22:53:39 UTC) #2
jsbell
On 2014/07/31 22:53:39, jsbell wrote: > (3) Are there places outside IDB that are affected ...
6 years, 4 months ago (2014-07-31 22:56:31 UTC) #3
jsbell
Looks like DEFINE_STATIC_LOCAL is inherently threadsafe if-and-only-if the constructor itself is threadsafe. But that's not ...
6 years, 4 months ago (2014-08-01 18:18:36 UTC) #4
cmumford
On 2014/08/01 18:18:36, jsbell (OOO through Aug 10) wrote: > Looks like DEFINE_STATIC_LOCAL is inherently ...
6 years, 4 months ago (2014-08-04 16:34:46 UTC) #5
cmumford
Josh: Here's the version with all IDB classes converted to WTF::String. Two things: 1) I'm ...
6 years, 4 months ago (2014-08-04 20:09:47 UTC) #6
cmumford
On 2014/08/04 20:09:47, cmumford wrote: > Josh: > > Here's the version with all IDB ...
6 years, 4 months ago (2014-08-06 16:17:18 UTC) #7
jsbell
On 2014/08/06 16:17:18, cmumford wrote: > On 2014/08/04 20:09:47, cmumford wrote: > > Josh: > ...
6 years, 4 months ago (2014-08-11 19:18:57 UTC) #8
cmumford
https://codereview.chromium.org/426063010/diff/40001/Source/modules/modules_generated.gyp File Source/modules/modules_generated.gyp (right): https://codereview.chromium.org/426063010/diff/40001/Source/modules/modules_generated.gyp#newcode25 Source/modules/modules_generated.gyp:25: '../core/css/CSSGrammar.y', I don't believe that CSSGrammar.y is required here. ...
6 years, 4 months ago (2014-08-12 17:44:55 UTC) #9
jsbell
lgtm with a few suggestions. abarth@ should probably review as well. https://codereview.chromium.org/426063010/diff/40001/Source/core/Init.h File Source/core/Init.h (right): ...
6 years, 4 months ago (2014-08-12 18:46:13 UTC) #10
cmumford
+abarth for a review of the rest of the files. abarth: Please see patch set ...
6 years, 4 months ago (2014-08-12 19:30:41 UTC) #11
abarth-chromium
Can we split this CL into two pieces: 1) The first patch restructures initialization. 2) ...
6 years, 4 months ago (2014-08-12 19:51:13 UTC) #12
cmumford
https://codereview.chromium.org/426063010/diff/60001/Source/modules/modules_generated.gyp File Source/modules/modules_generated.gyp (right): https://codereview.chromium.org/426063010/diff/60001/Source/modules/modules_generated.gyp#newcode19 Source/modules/modules_generated.gyp:19: '../core/core_generated.gyp:core_event_interfaces', I just noticed core_event_interfaces - I don't believe ...
6 years, 4 months ago (2014-08-12 19:52:34 UTC) #13
abarth-chromium
https://codereview.chromium.org/426063010/diff/60001/Source/modules/modules_generated.gyp File Source/modules/modules_generated.gyp (right): https://codereview.chromium.org/426063010/diff/60001/Source/modules/modules_generated.gyp#newcode19 Source/modules/modules_generated.gyp:19: '../core/core_generated.gyp:core_event_interfaces', This seems unlikely to be necessary.
6 years, 4 months ago (2014-08-12 20:33:00 UTC) #14
cmumford
This is the first patch set after factoring out the module initialization changes into a ...
6 years, 4 months ago (2014-08-13 15:59:19 UTC) #15
jsbell
still lgtm, although I'm not confident in my ability to spot gyp issues.
6 years, 4 months ago (2014-08-13 16:39:39 UTC) #16
abarth-chromium
LGTM
6 years, 4 months ago (2014-08-13 17:59:31 UTC) #17
cmumford
The CQ bit was checked by cmumford@chromium.org
6 years, 4 months ago (2014-08-13 18:04:18 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/426063010/100001
6 years, 4 months ago (2014-08-13 18:05:24 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-08-13 20:53:25 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (100001) as 180205

Powered by Google App Engine
This is Rietveld 408576698