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

Issue 295163005: Remove ScriptState::current() from IDBRequest (Closed)

Created:
6 years, 7 months ago by haraken
Modified:
6 years, 6 months ago
Reviewers:
dcarney, jsbell, adamk
CC:
blink-reviews, dgrogan, jsbell+idb_chromium.org, alecflett, ericu+idb_chromium.org, cmumford
Visibility:
Public.

Description

Remove ScriptState::current() from IDBRequest - ScriptState::current() should be called only from the binding layer. This CL removes ScriptState::current() from IDBRequest. For that goal, this CL passes ScriptState around in a lot of places in IDB code. - This CL also introduces ScriptStateForTesting. It's hard to use ScriptState for testing purposes because webkit_unit_tests doesn't create DOMWindow nor ExecutionContext, and thus ScriptState cannot be associated with a valid ExecutionContext. On the other hand, ScriptStateForTesting allows us to mock the ExecutionContext for testing purpose. - This CL renames V8ExecutionScope to V8TestingScope. This is because V8TestingScope uses ScriptStateForTesting, and thus it's only for testing. - This CL stops using V8ExecutionScope in V8GCController, because V8GCController is not for testing. BUG=357144 TBR=adamk Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174937

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -217 lines) Patch
M Source/bindings/v8/IDBBindingUtilitiesTest.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseResolverTest.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseTest.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptState.h View 1 2 3 4 5 4 chunks +18 lines, -3 lines 0 comments Download
M Source/bindings/v8/ScriptState.cpp View 1 2 3 4 5 3 chunks +30 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 2 chunks +15 lines, -15 lines 0 comments Download
M Source/bindings/v8/V8GCController.cpp View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/animation/AnimationTest.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/animation/EffectInputTest.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/animation/TimingInputTest.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.cpp View 1 2 3 4 6 chunks +10 lines, -10 lines 0 comments Download
M Source/modules/indexeddb/IDBCursor.idl View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBFactory.h View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M Source/modules/indexeddb/IDBFactory.cpp View 1 2 3 4 3 chunks +28 lines, -28 lines 0 comments Download
M Source/modules/indexeddb/IDBFactory.idl View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBIndex.h View 1 2 3 4 1 chunk +7 lines, -7 lines 0 comments Download
M Source/modules/indexeddb/IDBIndex.cpp View 1 2 3 4 9 chunks +18 lines, -18 lines 0 comments Download
M Source/modules/indexeddb/IDBIndex.idl View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.h View 1 2 3 4 3 chunks +11 lines, -11 lines 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.cpp View 1 2 3 4 22 chunks +36 lines, -35 lines 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.idl View 1 2 3 4 1 chunk +8 lines, -8 lines 0 comments Download
M Source/modules/indexeddb/IDBOpenDBRequest.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/indexeddb/IDBOpenDBRequest.cpp View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBRequest.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/indexeddb/IDBRequest.cpp View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M Source/modules/indexeddb/IDBRequestTest.cpp View 1 2 3 4 4 chunks +10 lines, -12 lines 0 comments Download
M Source/modules/indexeddb/IDBTransactionTest.cpp View 1 2 3 4 2 chunks +7 lines, -9 lines 0 comments Download
M Source/modules/indexeddb/InspectorIndexedDBAgent.cpp View 1 2 3 4 4 chunks +7 lines, -7 lines 0 comments Download
M Source/web/tests/CustomEventTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
haraken
PTAL
6 years, 7 months ago (2014-05-23 16:50:49 UTC) #1
jsbell
This patch looks very familiar - prior to the NewScriptState change I had a nearly ...
6 years, 7 months ago (2014-05-23 17:21:34 UTC) #2
haraken
Thanks for review! > This failure is real: > > [ RUN ] IDBTransactionTest.EnsureLifetime > ...
6 years, 7 months ago (2014-05-23 18:07:15 UTC) #3
haraken
On 2014/05/23 18:07:15, haraken wrote: > Thanks for review! > > > This failure is ...
6 years, 7 months ago (2014-05-26 07:01:41 UTC) #4
haraken
https://codereview.chromium.org/295163005/diff/1/Source/modules/indexeddb/IDBObjectStore.cpp File Source/modules/indexeddb/IDBObjectStore.cpp (right): https://codereview.chromium.org/295163005/diff/1/Source/modules/indexeddb/IDBObjectStore.cpp#newcode374 Source/modules/indexeddb/IDBObjectStore.cpp:374: generateIndexKeysForValue(m_scriptState->isolate(), m_indexMetadata, value, &indexKeys); On 2014/05/23 17:21:35, jsbell wrote: ...
6 years, 7 months ago (2014-05-26 07:04:02 UTC) #5
haraken
jsbell@: friendly ping :)
6 years, 7 months ago (2014-05-27 00:35:19 UTC) #6
jsbell
On 2014/05/27 00:35:19, haraken wrote: > jsbell@: friendly ping :) Yep - holiday here, will ...
6 years, 7 months ago (2014-05-27 01:45:46 UTC) #7
haraken
On 2014/05/27 01:45:46, jsbell wrote: > On 2014/05/27 00:35:19, haraken wrote: > > jsbell@: friendly ...
6 years, 7 months ago (2014-05-27 01:51:43 UTC) #8
jsbell
lgtm https://codereview.chromium.org/295163005/diff/40001/Source/bindings/v8/ScriptState.h File Source/bindings/v8/ScriptState.h (right): https://codereview.chromium.org/295163005/diff/40001/Source/bindings/v8/ScriptState.h#newcode72 Source/bindings/v8/ScriptState.h:72: virtual void setExecutionContext(PassRefPtr<ExecutionContext>) { } ASSERT_NOT_REACHED() ? https://codereview.chromium.org/295163005/diff/40001/Source/modules/indexeddb/IDBRequestTest.cpp ...
6 years, 7 months ago (2014-05-27 18:38:47 UTC) #9
haraken
Thanks for review! https://codereview.chromium.org/295163005/diff/40001/Source/bindings/v8/ScriptState.h File Source/bindings/v8/ScriptState.h (right): https://codereview.chromium.org/295163005/diff/40001/Source/bindings/v8/ScriptState.h#newcode72 Source/bindings/v8/ScriptState.h:72: virtual void setExecutionContext(PassRefPtr<ExecutionContext>) { } On ...
6 years, 7 months ago (2014-05-28 00:35:49 UTC) #10
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 7 months ago (2014-05-28 00:35:53 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/295163005/60001
6 years, 7 months ago (2014-05-28 00:36:16 UTC) #12
jsbell
lgtm again! https://codereview.chromium.org/295163005/diff/40001/Source/modules/indexeddb/IDBRequestTest.cpp File Source/modules/indexeddb/IDBRequestTest.cpp (right): https://codereview.chromium.org/295163005/diff/40001/Source/modules/indexeddb/IDBRequestTest.cpp#newcode96 Source/modules/indexeddb/IDBRequestTest.cpp:96: RefPtrWillBeRawPtr<IDBRequest> request = IDBRequest::create(ScriptState::current(isolate()), IDBAny::createUndefined(), transaction); On ...
6 years, 6 months ago (2014-05-28 01:21:56 UTC) #13
haraken
This CL caused serious conflicts with the oilpan CL. Will rebase and land.
6 years, 6 months ago (2014-05-28 01:46:08 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: blink_presubmit on tryserver.blink ...
6 years, 6 months ago (2014-05-28 02:08:00 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-28 02:17:13 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/9393)
6 years, 6 months ago (2014-05-28 02:17:14 UTC) #17
haraken
TBRing adamk@ for web/
6 years, 6 months ago (2014-05-28 02:32:33 UTC) #18
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 6 months ago (2014-05-28 02:32:38 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/295163005/80001
6 years, 6 months ago (2014-05-28 02:33:12 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-05-28 04:29:12 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-28 04:55:36 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/12883)
6 years, 6 months ago (2014-05-28 04:55:37 UTC) #23
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 6 months ago (2014-05-28 05:04:29 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/295163005/100001
6 years, 6 months ago (2014-05-28 05:04:48 UTC) #25
commit-bot: I haz the power
Change committed as 174937
6 years, 6 months ago (2014-05-28 06:21:58 UTC) #26
adamk
6 years, 6 months ago (2014-05-28 16:14:25 UTC) #27
Message was sent while issue was closed.
rslgtm

Powered by Google App Engine
This is Rietveld 408576698