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

Issue 320833002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed)

Created:
6 years, 6 months ago by Pritam Nikam
Modified:
6 years, 6 months ago
CC:
chromium-reviews, jam, alecflett, ericu+idb_chromium.org, darin-cc_chromium.org, cmumford, dgrogan, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[IndexedDB] Use consistent enums on both sides of IPC. Numerous IndexedDB IPC messages sent renderer->browser are defined members that are enums from Blink (public/platform), and on receipt are static_cast to types defined in Chromium: blink::WebIDBCursor::Direction => indexed_db::CursorDirection blink::WebIDBDatabase::TaskType => IndexedDBDatabase::TaskType blink::WebIDBDatabase::PutMode => IndexedDBDatabase::PutMode blink::WebIDBDatabase::TransactionMode => uint16 => indexed_db::TransactionMode Nothing enforces the equality of these enums at compile time. So the approach adopted here is to move the Blink-side enums into public/platform/WebIDBTypes.h and use it everywhere. Patch spread across chromium content side as well as on Blink side. Chromium side: https://codereview.chromium.org/320833002 Blink side: https://codereview.chromium.org/325683002 BUG=381848 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278953

Patch Set 1 : #

Total comments: 24

Patch Set 2 : Incorporated review comments. #

Total comments: 14

Patch Set 3 : Incorporated review comments. #

Patch Set 4 : Rebase patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -170 lines) Patch
M content/browser/indexed_db/indexed_db.h View 1 chunk +0 lines, -13 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.h View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.cc View 1 2 3 10 chunks +18 lines, -16 lines 0 comments Download
M content/browser/indexed_db/indexed_db_cursor.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_cursor.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_database.h View 1 2 5 chunks +5 lines, -15 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database.cc View 1 2 3 27 chunks +32 lines, -32 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database_unittest.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/indexed_db/indexed_db_dispatcher_host.cc View 1 2 3 2 chunks +10 lines, -11 lines 0 comments Download
M content/browser/indexed_db/indexed_db_fake_backing_store.h View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_fake_backing_store.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction.h View 1 4 chunks +6 lines, -5 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction_coordinator.cc View 1 5 chunks +7 lines, -6 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction_unittest.cc View 1 8 chunks +12 lines, -13 lines 0 comments Download
M content/child/indexed_db/indexed_db_dispatcher.h View 1 2 4 chunks +5 lines, -6 lines 0 comments Download
M content/child/indexed_db/indexed_db_dispatcher.cc View 1 2 3 3 chunks +4 lines, -5 lines 0 comments Download
M content/child/indexed_db/indexed_db_dispatcher_unittest.cc View 1 2 5 chunks +6 lines, -5 lines 0 comments Download
M content/child/indexed_db/webidbdatabase_impl.h View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M content/child/indexed_db/webidbdatabase_impl.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M content/common/indexed_db/indexed_db_messages.h View 1 2 5 chunks +11 lines, -13 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Pritam Nikam
Hi, I've adopted 2nd approach i.e. to move the Blink-side enums into public/platform/WebIDBTypes.h and use ...
6 years, 6 months ago (2014-06-09 10:44:05 UTC) #1
jsbell
Initial feedback. I commented on the blink side that enum names like "blink::Direction" should be ...
6 years, 6 months ago (2014-06-09 16:38:27 UTC) #2
Pritam Nikam
Thanks jsbell! Incorporated review comments and new patch is ready for review. Please have a ...
6 years, 6 months ago (2014-06-11 14:05:16 UTC) #3
jsbell
Overall looks good, a few tweaks necessary. Blink side will need to land first. tsepez@ ...
6 years, 6 months ago (2014-06-11 16:42:02 UTC) #4
Pritam Nikam
Thanks jsbell! Incorporated review comments and new patch uploaded for review. Please have a look. ...
6 years, 6 months ago (2014-06-12 11:19:20 UTC) #5
jsbell
lgtm! So what you'll want to do is land the Blink side, note what revision ...
6 years, 6 months ago (2014-06-12 16:26:36 UTC) #6
Tom Sepez
Messages LGTM. Thanks for making things more consistent.
6 years, 6 months ago (2014-06-12 18:28:59 UTC) #7
jsbell
On 2014/06/12 16:26:36, jsbell wrote: > lgtm! > > So what you'll want to do ...
6 years, 6 months ago (2014-06-18 17:13:41 UTC) #8
jsbell
The CQ bit was checked by jsbell@chromium.org
6 years, 6 months ago (2014-06-20 17:43:08 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pritam.nikam@samsung.com/320833002/70001
6 years, 6 months ago (2014-06-20 17:48:20 UTC) #10
jsbell
The CQ bit was unchecked by jsbell@chromium.org
6 years, 6 months ago (2014-06-20 18:38:36 UTC) #11
jsbell
The CQ bit was checked by jsbell@chromium.org
6 years, 6 months ago (2014-06-20 18:38:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pritam.nikam@samsung.com/320833002/70001
6 years, 6 months ago (2014-06-20 19:03:59 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 20:19:43 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-20 20:23:19 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/30546) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/19754)
6 years, 6 months ago (2014-06-20 20:23:20 UTC) #16
Pritam Nikam
The CQ bit was checked by pritam.nikam@samsung.com
6 years, 6 months ago (2014-06-21 05:25:43 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pritam.nikam@samsung.com/320833002/90001
6 years, 6 months ago (2014-06-21 05:29:37 UTC) #18
commit-bot: I haz the power
6 years, 6 months ago (2014-06-21 13:14:17 UTC) #19
Message was sent while issue was closed.
Change committed as 278953

Powered by Google App Engine
This is Rietveld 408576698