New issue
Advanced search Search tips

Issue 762396 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

WebIDL-based generated classes for callback functions should be prefixed with "V8".

Project Member Reported by yukishiino@chromium.org, Sep 6 2017

Issue description

Auto-generated C++ classes for IDL interfaces are named with prefix "V8", e.g. interface Node => class V8Node.  Auto-generated C++ classes for (Web IDL based) callback functions should follow the same manner, e.g. callback IDBObserverCallback => class V8IDBObserverCallback.

This is good for:
- It's consistent with IDL interfaces.
- We can avoid name conflict with Blink implementation (e.g. when Blink already has "class X", then we cannot define "callback X" in Web IDL.)

 
This renaming will be helpful for Issue 761755, which needs some refactoring of event handlers / callback functions.

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 7 2017

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

commit 2dee475fbda206f8afa2944ffba9c8b50b78664d
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Thu Sep 07 04:10:33 2017

bindings: Add 'V8' prefix on generated callback function classes

They are in bindings layer, and their old names can easily conflict
with hand written code classes.

So this CL renames FooCallback class as V8FooCallback to show they
are generated bindings classes.


Bug:  762396 
Change-Id: I89e988543fce3a5a23ff44ea104cc858e21bd4da
Reviewed-on: https://chromium-review.googlesource.com/652726
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500212}
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/modules/v8/generated.gni
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/scripts/v8_types.py
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/core/any_callback_function_optional_any_arg.h
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/core/string_sequence_callback_function_long_sequence_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_any_callback_function_optional_any_arg.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_any_callback_function_optional_any_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_long_callback_function.cc
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_long_callback_function.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_string_sequence_callback_function_long_sequence_arg.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_string_sequence_callback_function_long_sequence_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function.cc
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_dictionary_arg.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_dictionary_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_enum_arg.cc
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_enum_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_interface_arg.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_interface_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_test_interface_sequence_arg.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_test_interface_sequence_arg.h
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_typedef.cc
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/core/v8_void_callback_function_typedef.h
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/core/void_callback_function_dictionary_arg.h
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/core/void_callback_function_interface_arg.h
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/core/void_callback_function_test_interface_sequence_arg.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
[rename] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/modules/v8_void_callback_function_modules.cc
[add] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/bindings/tests/results/modules/v8_void_callback_function_modules.h
[delete] https://crrev.com/21254bb31538d38a5af388d4e9aab94227934a2b/third_party/WebKit/Source/bindings/tests/results/modules/void_callback_function_modules.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/clipboard/DataTransferItem.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/dom/MutationObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/dom/MutationObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/frame/ReportingObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/frame/ReportingObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/intersection_observer/IntersectionObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/intersection_observer/IntersectionObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/mojo/MojoHandle.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/mojo/MojoWatcher.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/testing/CallbackFunctionTest.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/timing/PerformanceObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/timing/PerformanceObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/mediasession/MediaSession.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/remoteplayback/AvailabilityCallbackWrapper.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/remoteplayback/AvailabilityCallbackWrapper.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/Database.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/Database.h
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
[modify] https://crrev.com/2dee475fbda206f8afa2944ffba9c8b50b78664d/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h

Comment 3 by peria@chromium.org, Sep 7 2017

Status: Fixed (was: Assigned)

Sign in to add a comment