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

Issue 2458573002: bindings: Store ScriptState in generated callback functions (Closed)

Created:
4 years, 1 month ago by bashi
Modified:
4 years, 1 month ago
Reviewers:
haraken, peria, Yuki
CC:
chromium-reviews, blink-reviews, jsbell+idb_chromium.org, blink-reviews-bindings_chromium.org, cmumford
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bindings: Store ScriptState in generated callback functions As the spec says[1], we should store "callback context" (which is ScriptState in Blink) when creating callback impl instances and use it to invoke v8 functions, instead of passing ScriptState at invoke time. [1] https://heycam.github.io/webidl/#es-callback-function BUG=618672 Committed: https://crrev.com/1c5aa5f5af6a2246bb55a29862e6d9f42256c43a Cr-Commit-Position: refs/heads/master@{#427918}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -175 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/custom/V8PerformanceObserverCustom.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_callback_function.py View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl View 4 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp View 3 chunks +11 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp View 3 chunks +13 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp View 3 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 7 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp View 3 chunks +10 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp View 3 chunks +11 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp View 3 chunks +11 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp View 3 chunks +10 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/testing/CallbackFunctionTest.h View 1 chunk +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp View 3 chunks +5 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/testing/CallbackFunctionTest.idl View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceObserver.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBObserver.h View 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp View 2 chunks +6 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (9 generated)
bashi
PTAL. I didn't remove m_scriptState from PerformanceObserver and RemotePlayback because m_scriptState is used not only ...
4 years, 1 month ago (2016-10-27 00:52:21 UTC) #4
haraken
LGTM Yes, this should make the context callback functions use more correct. > I didn't ...
4 years, 1 month ago (2016-10-27 01:02:34 UTC) #6
bashi
On 2016/10/27 01:02:34, haraken wrote: > LGTM > > Yes, this should make the context ...
4 years, 1 month ago (2016-10-27 01:08:02 UTC) #7
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/2458573002/1
4 years, 1 month ago (2016-10-27 02:11:22 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-10-27 02:17:51 UTC) #13
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/1c5aa5f5af6a2246bb55a29862e6d9f42256c43a Cr-Commit-Position: refs/heads/master@{#427918}
4 years, 1 month ago (2016-10-27 02:21:54 UTC) #15
Yuki
I don't think we need to revert this CL immediately, but there seems misunderstanding. https://heycam.github.io/webidl/#es-callback-function ...
4 years, 1 month ago (2016-10-27 12:16:30 UTC) #16
bashi
On 2016/10/27 12:16:30, Yuki wrote: > I don't think we need to revert this CL ...
4 years, 1 month ago (2016-10-27 22:08:27 UTC) #17
bashi
I've just read the thread you guys were discussing the issue. Still I couldn't get ...
4 years, 1 month ago (2016-10-27 23:25:18 UTC) #18
Yuki
4 years, 1 month ago (2016-10-28 09:25:27 UTC) #19
Message was sent while issue was closed.
On 2016/10/27 23:25:18, bashi1 wrote:
> I've just read the thread you guys were discussing the issue. Still I couldn't
> get a right solution:( I'd like to chat offline to understand what's we should
> do in general (in next week).

Yes, let's discuss offline.

Powered by Google App Engine
This is Rietveld 408576698