New issue
Advanced search Search tips

Issue 653769 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Auto-generated bindings for IDL callback function use SetVerbose() internally

Project Member Reported by bashi@chromium.org, Oct 7 2016

Issue description

Our current implementation doesn't allow user scripts to catch exceptions which are thrown while executing IDL callback functions. We should make sure this is OK or not.
 

Comment 1 by bashi@chromium.org, Oct 7 2016

Summary: Auto-generated bindings for IDL callback function use SetVerbose() internally (was: Make sure that not throwing exceptions while executing IDL callback functions)
I would imagine that we could route them to $GLOBAL.onerror but that probably needs to be defined on a spec-by-spec basis.

Comment 3 by bashi@chromium.org, Oct 11 2016

Thanks for the comment. It seems that we already route exceptions to onerror.

For records:
- If a spec defines behavior, generated bindings for callback function needs to take an ExceptionState so that impl classes can follow the spec
- We don't have to pass an ExceptionState if routing exceptions to onerror is enough

At this point, routing exceptions to onerror seems enough.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61

commit 4c55631f51b13ae018c6b2f9c6cac9ecc711ed61
Author: bashi <bashi@chromium.org>
Date: Tue Oct 11 06:46:40 2016

bindings: Stop passing ExceptionState to callback function

At this point we don't need to provide a way to allow user scripts
to catch exceptions which are thrown while invoking callback functions.
Always passing TrackExceptionState seems redundant so declare it
inside auto-generated code. We can restore or add another call() later
if we really need it.

BUG=653769

Review-Url: https://codereview.chromium.org/2411583002
Cr-Commit-Position: refs/heads/master@{#424380}

[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.h
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/VoidExperimentalCallbackFunction.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/core/VoidExperimentalCallbackFunction.h
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/core/timing/PerformanceObserver.cpp
[modify] https://crrev.com/4c55631f51b13ae018c6b2f9c6cac9ecc711ed61/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp

Sign in to add a comment