New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 872138 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Redesign EventListeners and EventHandlers in blink

Project Member Reported by yukiy@google.com, Aug 8

Issue description

This issue aims at implementing incumbent realm in EventListener/EventHandler.

Current implementation of EventListener and EventHandler in blink does not conform web standards because it dose not support incumbent realm. This can be solved by implementing EventListener/EventHandler based on blink::CallbackInterfaceBase and blink::CallbackFunctionBase.
Also, blink::V8AbstractEventListener set entry realm to invoked event's one, but it should be another one that is relevant to listener. We can fix such incorrect things with this issue too.
 
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 13

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

commit 0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57
Author: Yuki Yamada <yukiy@google.com>
Date: Mon Aug 13 02:05:12 2018

Rename V8EventListener to V8EventListenerOrEventHandler

This CL renames V8EventListener to V8EventListenerOrEventHandler in
order to use callback interface EventListener generated by
event_listener.idl:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/events/event_listener.idl?type=cs&q=%22callback+interface+EventListener%22&sq=package:chromium&g=0&l=23
https://dom.spec.whatwg.org/#interface-eventtarget
The generated class will be named as "V8EventListener", so we have to
rename current V8EventListener.

Bug:  872138 
Change-Id: Iceaf2e0ccbfb0f0b4be38381b14d79c63d0982af
Reviewed-on: https://chromium-review.googlesource.com/1170670
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#582495}
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_error_handler.h
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
[rename] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[rename] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/core/inspector/thread_debugger.cc
[modify] https://crrev.com/0ef1727a92e833e4861e1c2ee8ad8fbaf01e4d57/third_party/blink/renderer/platform/bindings/v8_private_property.h

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 14

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

commit de901269bda0d336f0777e6df373756ff04451d4
Author: Yuki Yamada <yukiy@google.com>
Date: Tue Aug 14 03:40:23 2018

Do not clear TraceWrapperV8Reference in blink::V8AbstractEventListener destructor

This CL removed some code that clearing TraceWrapperV8Reference object
in its destructor.
|listener_| is cleared in the destructor of TraceWrapperV8Reference, so
we do not have to clear it in blink::V8AbstractEventListener.

Bug:  872138 
Change-Id: I4f8e8e67074ee8b2081735053b5b0f7604afadff
Reviewed-on: https://chromium-review.googlesource.com/1173195
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582819}
[modify] https://crrev.com/de901269bda0d336f0777e6df373756ff04451d4/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 14

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

commit 0422626272014f175914a3f80f75c637db713bd3
Author: Yuki Yamada <yukiy@google.com>
Date: Tue Aug 14 08:02:54 2018

Use EventListener instead of the classes which inherits it

I am planning to replace V8AbstractEventListener and its subclasses by
new classes I will implement for redesigning EventListener/EventHandler
in  https://crbug.com/872138 , so it is better to remove unnecessary
dependencies on the classes which inherits blink::EventListener before
addressing that.
Basically, we should not use blink::V8AbstractEventListener or other
classes which inherits EventListener unless we have to use the methods
implemented only in child class, but there are some cases that uses
child classes without any need. Therefore this CL replaced child
classes by blink::EventListener if possible.

Bug:  872138 
Change-Id: Idc82f93fdc850f532092cc021f6aa458803dcd7b
Reviewed-on: https://chromium-review.googlesource.com/1170714
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582861}
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/core/dom/events/event_listener.h
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/0422626272014f175914a3f80f75c637db713bd3/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc

Cc: timothygu@chromium.org
This might be of interest to y’all: https://github.com/whatwg/html/pull/3836 We recently changed the event handlers spec to be more like the current Chrome behavior.
Thanks for sharing it, Timothy!
It was one of the points that confused me at first.
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 23

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

commit 261e251b583cfc622c25ab1fff7b00464261c719
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Aug 23 09:53:02 2018

Do not call undefined internals.gc()

Undefined internals.gc() is called in onEventInFrame() and a TypeError
is thrown in current test, but the error is not visible because the
error is dispatched in another frame as mentioned in
 https://crbug.com/606900  .
The test will call gc() instead of internals.gc() after and work as
intended after this patch.

Bug:  872138 ,  606900 
Change-Id: I5d059e5ff7bea56b382f0e973282788427f5a306
Reviewed-on: https://chromium-review.googlesource.com/1186287
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585441}
[modify] https://crrev.com/261e251b583cfc622c25ab1fff7b00464261c719/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-removed.html

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 23

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

commit 856fc5567263cadd3edcfd56c1d8e6e6b6873f07
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Aug 23 11:31:06 2018

Check script execution is forbidden or not only in MainWorld

We should not forbid script execution in isolated worlds when
dispatching events (it should be operated by disabling Chrome
extension), so checking execution setting is necessary only in main
world.
V8EventListenerOrEventHandler::CallListenerFunction() already
implements this, so this CL make
GeneratedCodeHelper::IsCallbackRunnable() to do the same conditional
check for other callbacks generated by IDL files.

Test for this is already exists:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/events/events-in-isolated-world.html

Bug:  872138 , 608286, 608641
Change-Id: Ibc38e6033d6d0462362012f1c49271548c26a8ec
Reviewed-on: https://chromium-review.googlesource.com/1186212
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#585449}
[modify] https://crrev.com/856fc5567263cadd3edcfd56c1d8e6e6b6873f07/third_party/blink/renderer/bindings/core/v8/generated_code_helper.cc

Description: Show this description
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 5

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

commit da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c
Author: Yuki Yamada <yukiy@google.com>
Date: Wed Sep 05 03:00:10 2018

Split implementation of EventListener and EventHandler

This CL add new class blink::V8EventListenerImpl which implements
ONLY EventListener (not EventHandler). It has a blink::V8EventListener
which inherits blink::CallbackInterfaceBase. As a result, EventListener
will start to handle incumbent realm. EventHandler will still be
offered by blink::V8AbstractEventListener (this class is renamed to
blink::V8AbstractEventHandler in this CL) after this CL submitted.
Also, entry realm was set to wrong one (event target's one) with
blink::V8AbstractEventLisntener so this CL set it to listener's one as
defined in standard.

Regarding  crbug.com/872138  :
Current blink::V8AbstractEventListener implements both of EventListener
and EventHandler, so I am trying to implement new class for
EventListener first to separate these. EventHandler will be modified in following CLs.

Regarding  crbug.com/878658  :
This CL modifies expectation file for layout test:
fast/events/touch/gesture/gesture-tap-frame-removed.html
This is because event listener starts to remember incumbent realm after
this CL and it results in incorrect behavior as explained in the BUG.
This is not a regression, but have to be resolved in following CLs.

Bug:  872138 ,  878658 ,  606900 ,  849236 
Change-Id: I4bf7fe2f4fd51287f873c2377edfd57e4bb2a54a
Reviewed-on: https://chromium-review.googlesource.com/1172234
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588748}
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/external/wpt/dom/events/event-global-extra.window-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/083-expected.txt
[delete] https://crrev.com/683690300a6f2b0f8d2acff300f856065c826cd7/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/084-expected.txt
[delete] https://crrev.com/683690300a6f2b0f8d2acff300f856065c826cd7/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-1-expected.txt
[delete] https://crrev.com/683690300a6f2b0f8d2acff300f856065c826cd7/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-2-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash.html
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/fast/dom/ready-state-change-crash-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-removed-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-merged-nodes-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers-expected.txt
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers.js
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[rename] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.cc
[rename] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[add] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
[add] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_gc_controller.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/scripts/v8_types.py
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/core/dom/events/event_listener.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.cc
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/platform/bindings/callback_interface_base.h
[modify] https://crrev.com/da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 6

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

commit 555a52b75bcaa3c536f3c7447819f620c6b61637
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Sep 06 02:51:09 2018

Renamed V8 private properties

This CL renames V8 private property names regarding to
V8EventListenerOrEventHandler.
This property is used in not only blink::V8EventListenerOrEventHandler
but also other classes (blink::V8EventListenerImpl,
blink::V8LazyEventListener, blink::V8EventListenerHelper).
These classes that is related to event listener is under redesigning
as described  crbug.com/872138  and it is confusing to use
"V8EventListenerOrEventHandler" for the InterfaceName of private
properties.

Bug:  872138 
Change-Id: I2509f60e7b527260b5f51a1e69305a53c3836302
Reviewed-on: https://chromium-review.googlesource.com/1206752
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#589092}
[modify] https://crrev.com/555a52b75bcaa3c536f3c7447819f620c6b61637/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[modify] https://crrev.com/555a52b75bcaa3c536f3c7447819f620c6b61637/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/555a52b75bcaa3c536f3c7447819f620c6b61637/third_party/blink/renderer/platform/bindings/v8_private_property.h

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 6

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 6

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

commit 32261aff1c9f1ea52367fb36022cef2e6ca188bd
Author: Yuki Shiino <yukishiino@chromium.org>
Date: Thu Sep 06 10:01:16 2018

v8binding: Support [TreatNonObjectAsNull] extended attribute.

When I first implemented IDL callback function, there was no use
case of [TreatNonObjectAsNull], and I didn't support it.  However,
now we're going to implement EventHandler of HTML, which uses
[TreatNonObjectAsNull], based on IDL callback function.  So, this
patch supports [TreatNonObjectAsNull].

Bug:  872138 
Change-Id: I2c4b7bd3b321e23cf27f4442ffa72ff76dc15e85
Reviewed-on: https://chromium-review.googlesource.com/1206790
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589124}
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/IDLExtendedAttributes.txt
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/scripts/v8_callback_function.py
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/templates/callback_interface.cpp.tmpl
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/templates/callback_invoke.cc.tmpl
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/idls/core/test_callback_functions.idl
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_any_callback_function_optional_any_arg.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_any_callback_function_variadic_any_args.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_long_callback_function.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_string_sequence_callback_function_long_sequence_arg.cc
[add] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_boolean_function.cc
[add] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_boolean_function.h
[add] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_void_function.cc
[add] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_void_function.h
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function_dictionary_arg.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function_enum_arg.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function_interface_arg.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function_test_interface_sequence_arg.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/core/v8_void_callback_function_typedef.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/bindings/tests/results/modules/v8_void_callback_function_modules.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/platform/bindings/callback_function_base.cc
[modify] https://crrev.com/32261aff1c9f1ea52367fb36022cef2e6ca188bd/third_party/blink/renderer/platform/bindings/callback_function_base.h

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 7

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

commit 9f87a1ee823c8bf185dfdde265e457c2cc668191
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Fri Sep 07 03:10:35 2018

Revert "Split implementation of EventListener and EventHandler"

This reverts commit da27378f03ea3dc4bdba82e3cb1d13ad2fef7a7c.

Reason for revert: This CL caused many crashes in the wild. (crbug.com/881348)

Original change's description:
> Split implementation of EventListener and EventHandler
>
> This CL add new class blink::V8EventListenerImpl which implements
> ONLY EventListener (not EventHandler). It has a blink::V8EventListener
> which inherits blink::CallbackInterfaceBase. As a result, EventListener
> will start to handle incumbent realm. EventHandler will still be
> offered by blink::V8AbstractEventListener (this class is renamed to
> blink::V8AbstractEventHandler in this CL) after this CL submitted.
> Also, entry realm was set to wrong one (event target's one) with
> blink::V8AbstractEventLisntener so this CL set it to listener's one as
> defined in standard.
>
> Regarding  crbug.com/872138  :
> Current blink::V8AbstractEventListener implements both of EventListener
> and EventHandler, so I am trying to implement new class for
> EventListener first to separate these. EventHandler will be modified in following CLs.
>
> Regarding  crbug.com/878658  :
> This CL modifies expectation file for layout test:
> fast/events/touch/gesture/gesture-tap-frame-removed.html
> This is because event listener starts to remember incumbent realm after
> this CL and it results in incorrect behavior as explained in the BUG.
> This is not a regression, but have to be resolved in following CLs.
>
> Bug:  872138 ,  878658 ,  606900 ,  849236 
> Change-Id: I4bf7fe2f4fd51287f873c2377edfd57e4bb2a54a
> Reviewed-on: https://chromium-review.googlesource.com/1172234
> Commit-Queue: Yuki Yamada <yukiy@google.com>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
> Reviewed-by: Hayato Ito <hayato@chromium.org>
> Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#588748}

TBR=peria@chromium.org,yukishiino@chromium.org,hayato@chromium.org,haraken@chromium.org,yukiy@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  872138 ,  878658 ,  606900 ,  849236 , 881348
Change-Id: Ie981df66657c8868c769cb8d18bf799605cfd004
Reviewed-on: https://chromium-review.googlesource.com/1212202
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589421}
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/external/wpt/dom/events/event-global-extra.window-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/083-expected.txt
[add] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/084-expected.txt
[add] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-1-expected.txt
[add] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-2-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash.html
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/fast/dom/ready-state-change-crash-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-removed-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-merged-nodes-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers-expected.txt
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers.js
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[rename] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.cc
[rename] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_listener.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[delete] https://crrev.com/231560efc85bde5d2fe9930bc36ce440745f671d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
[delete] https://crrev.com/231560efc85bde5d2fe9930bc36ce440745f671d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/scripts/v8_types.py
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/core/dom/events/event_listener.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/platform/bindings/callback_interface_base.h
[modify] https://crrev.com/9f87a1ee823c8bf185dfdde265e457c2cc668191/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 10

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

commit 20a443ce6dd653ce3259782667598f9b87211e5d
Author: Yuki Yamada <yukiy@google.com>
Date: Mon Sep 10 02:27:07 2018

Reland: Split implementation of EventListener and EventHandler

This reverts commit 9f87a1ee823c8bf185dfdde265e457c2cc668191.
https://chromium-review.googlesource.com/c/chromium/src/+/1212202

Regarding to crbug.com/881688 :
This CL adds the check for if listener is empty or not before calling
it, but it should not be empty at that time. This is because listener
object could be collected prematurally by garbage collection.
This will be fixed after unified GC is launched, or wrapper-tracing is
applied appropriately to all the EventTarget (some of EventTargets need
to be ActiveScriptWrappable).

Bug:  872138 , 881688,  878658 ,  606900 ,  849236 
Change-Id: I9b224e0d261e1567c4c4f7778bd0d6044b7f6202
Reviewed-on: https://chromium-review.googlesource.com/1212376
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#589820}
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/external/wpt/dom/events/event-global-extra.window-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/083-expected.txt
[delete] https://crrev.com/8a2c335368664b66cbb29fc739bb864dfd37b4a6/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/084-expected.txt
[delete] https://crrev.com/8a2c335368664b66cbb29fc739bb864dfd37b4a6/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-1-expected.txt
[delete] https://crrev.com/8a2c335368664b66cbb29fc739bb864dfd37b4a6/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/window-onerror-with-cross-frame-event-listeners-2-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/fast/dom/margin-height-guarded-crash.html
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/fast/dom/ready-state-change-crash-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-removed-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-merged-nodes-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers-expected.txt
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers.js
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[rename] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.cc
[rename] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[add] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
[add] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/scripts/v8_types.py
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/core/dom/events/event_listener.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/platform/bindings/callback_interface_base.h
[modify] https://crrev.com/20a443ce6dd653ce3259782667598f9b87211e5d/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 10

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

commit 22fe3bfa5b02d73c67585a1eb4e27faba1957aac
Author: Yuki Yamada <yukiy@google.com>
Date: Mon Sep 10 10:45:12 2018

Move exception handling into ErrorEvent

This CL moves the methods that is for storing/loading exceptions
into blink::ErrorEvent. These methods were in blink::V8ErrorHandler,
but they are not related to it directly.

Bug:  872138 
Change-Id: I9e60a9b58e786309d9410d47849b53233a47bd27
Reviewed-on: https://chromium-review.googlesource.com/1212248
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#589878}
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.cc
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/v8_error_handler.h
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
[modify] https://crrev.com/22fe3bfa5b02d73c67585a1eb4e27faba1957aac/third_party/blink/renderer/core/inspector/worker_thread_debugger.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 12

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

commit 663a4791889cc09f8fd6b21a26c3d09e33a7f9ad
Author: Yuki Yamada <yukiy@google.com>
Date: Wed Sep 12 01:00:35 2018

Remove "void GetFunctionLocation()"

This CL removes "void GetFunctionLocation(...)".
Only InspectorDOMDebuggerAgent::BuildObjectForEventListener() used this
method to set some values and it was not useful.
"std::unique_ptr<SourceLocation> GetFunctionLocation(...)" will be
moved into another class in following CL as commented, so this CL
addresses void one first.

Bug:  872138 
Change-Id: I6cbb771a11c50d70654eac2918d5246b6838adc4
Reviewed-on: https://chromium-review.googlesource.com/1219427
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#590556}
[modify] https://crrev.com/663a4791889cc09f8fd6b21a26c3d09e33a7f9ad/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[modify] https://crrev.com/663a4791889cc09f8fd6b21a26c3d09e33a7f9ad/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
[modify] https://crrev.com/663a4791889cc09f8fd6b21a26c3d09e33a7f9ad/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 13

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

commit d2c114f8bcb359def89500d31e104977201b41c2
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Sep 13 03:26:00 2018

Remove event_parameter_name_

This CL removed |event_parameter_name_| from V8LazyEventListener.
|event_parameter_name_| is initialized on creating V8LazyEventListener,
but it does not have to be used because what the arguments should be
named is defined in standard.

Bug:  872138 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id8dadeca9d5a8f0d3bb7232e80af298433ed01dd
Reviewed-on: https://chromium-review.googlesource.com/1219429
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590909}
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/html/forms/html_input_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/html/html_body_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/html/html_frame_element_base.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/html/html_frame_set_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/svg/animation/svg_smil_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/svg/svg_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/svg/svg_script_element.cc
[modify] https://crrev.com/d2c114f8bcb359def89500d31e104977201b41c2/third_party/blink/renderer/core/svg/svg_svg_element.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 13

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

commit 62306804ec2c41428e57c89431313c0228746006
Author: Yuki Shiino <yukishiino@chromium.org>
Date: Thu Sep 13 09:40:53 2018

v8binding: Create callback from v8::Object when [TreatNonObjectAsNull]

Allows to create an IDL callback function from v8::Object when
[TreatNonObjectAsNull] is specified.  This is a follow-up of
https://crrev.com/c/1206790

Bug:  872138 
Change-Id: I8913c97983acfc504bb6faa48e367ceec0b25be3
Reviewed-on: https://chromium-review.googlesource.com/1223952
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590960}
[modify] https://crrev.com/62306804ec2c41428e57c89431313c0228746006/third_party/blink/renderer/bindings/templates/callback_function.h.tmpl
[modify] https://crrev.com/62306804ec2c41428e57c89431313c0228746006/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_boolean_function.h
[modify] https://crrev.com/62306804ec2c41428e57c89431313c0228746006/third_party/blink/renderer/bindings/tests/results/core/v8_treat_non_object_as_null_void_function.h

Project Member

Comment 20 by bugdroid1@chromium.org, Sep 13

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

commit 45dedabecb98f1e92ea8cc409ecb68cd4574a7e9
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Sep 13 11:26:44 2018

Designate world on creating lazy listener

This CL make V8LazyEventListener::Create() receive DOMWrapperWorld.
Current V8LazyEventListener assumes that it is created only in main
world, but Chrome extensions can also create lazy listener with
Element.setAttribute(). It is safer to check if there are current
context because current context should exist on executing
Element.setAttribute(). We can get world from that current context.

Bug:  872138 
Change-Id: I684affc2937a5f79bf6c9a685761092ac4067df6
Reviewed-on: https://chromium-review.googlesource.com/1218244
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590972}
[modify] https://crrev.com/45dedabecb98f1e92ea8cc409ecb68cd4574a7e9/third_party/WebKit/LayoutTests/http/tests/security/isolatedWorld/no-bypass-main-world-csp-for-delayed-execution-expected.txt
[modify] https://crrev.com/45dedabecb98f1e92ea8cc409ecb68cd4574a7e9/third_party/WebKit/LayoutTests/http/tests/security/isolatedWorld/resources/no-bypass-main-world-csp-for-delayed-execution.js
[modify] https://crrev.com/45dedabecb98f1e92ea8cc409ecb68cd4574a7e9/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[modify] https://crrev.com/45dedabecb98f1e92ea8cc409ecb68cd4574a7e9/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[modify] https://crrev.com/45dedabecb98f1e92ea8cc409ecb68cd4574a7e9/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 25

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

commit 7a8e3acbe48a413be2aec5b363ee69d96c617a3c
Author: Yuki Yamada <yukiy@google.com>
Date: Tue Sep 25 04:59:03 2018

Remove the private property "ErrorEventError"

This CL removes a private property.
We do not have to have both of the private property of
"ErrorEventError" and |error_|, the
TraceWrapperV8Reference<v8::Value> in blink::ErrorEvent.

Also, the error attribute passed to listener should be initialized to
null for dedicated workers.
https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2
This CL modifies some tests regarding this too.

Bug:  872138 
Change-Id: I497434d04c30f222ea8847239edf4e9a0ee97b19
Reviewed-on: https://chromium-review.googlesource.com/1233080
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593824}
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/WebKit/LayoutTests/fast/workers/resources/onerror-test.js
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-05-expected.txt
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-05.html
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-07-expected.txt
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-07.html
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/custom/v8_error_event_custom.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/core/inspector/worker_thread_debugger.cc
[modify] https://crrev.com/7a8e3acbe48a413be2aec5b363ee69d96c617a3c/third_party/blink/renderer/platform/bindings/v8_private_property.h

Project Member

Comment 22 by bugdroid1@chromium.org, Sep 27

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

commit c405df54dfe63f951e9b67b1e302f6c60000c8c3
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Sep 27 08:22:56 2018

Use IsNativeBased() instead of checking ListenerType

This is a follow-up for I4bf7fe2f4fd51287f873c2377edfd57e4bb2a54a .
ListenerType::kJSEventHandlerType is added in previous CL and used
instead of ListenerType::kJSEventListenerType.
EventTarget::ReportBlockedEvent() checks the ListenerType, so we have
to make it check in accord with new condition.

Bug:  872138 
Change-Id: I092f97929a6aea5a6dfb6d7c842b913d8d652a6f
Reviewed-on: https://chromium-review.googlesource.com/1248062
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#594632}
[modify] https://crrev.com/c405df54dfe63f951e9b67b1e302f6c60000c8c3/third_party/blink/renderer/core/dom/events/event_target.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Sep 28

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

commit 731d4f1550a80641c0073baf6b9a935de4649c87
Author: Yuki Yamada <yukiy@google.com>
Date: Fri Sep 28 07:26:29 2018

Add Event::IsErrorEvent()

This CL adds blink::Event::IsErrorEvent() and also defines the type cast
ToErrorEvent() as blink::BeforeUnloadEvent does.
These will be used in following CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1215512

Bug:  872138 
Change-Id: Iaa2f6a1eb54dc8f4baecaeac44dc4cf48c6d8f04
Reviewed-on: https://chromium-review.googlesource.com/1250502
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#595006}
[modify] https://crrev.com/731d4f1550a80641c0073baf6b9a935de4649c87/third_party/blink/renderer/core/dom/events/event.cc
[modify] https://crrev.com/731d4f1550a80641c0073baf6b9a935de4649c87/third_party/blink/renderer/core/dom/events/event.h
[modify] https://crrev.com/731d4f1550a80641c0073baf6b9a935de4649c87/third_party/blink/renderer/core/events/error_event.cc
[modify] https://crrev.com/731d4f1550a80641c0073baf6b9a935de4649c87/third_party/blink/renderer/core/events/error_event.h

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 5

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

commit 1b2f95835607dbb9c6021df8893fb18f4c7aee9e
Author: Yuki Yamada <yukiy@google.com>
Date: Fri Oct 05 09:20:48 2018

Create new EventHandler and base class for EventListener/EventHandler

This CL implements these classes in Blink:
JSBasedEventListener                       (The base class for
 |                                          EventLisntener/EventHandler)
 +- JSEventListener                        (Implements EventListener)
 +- JSEventHandler                         (Implements EventHandler and
     |                                      other special types)
     +- JSEventHandlerForContentAttribute  (Supports lazy compilation
                                            for content attribute)
EventHandlers start to support incumbent realm using
blink::V8EventHandlerNonNull that inherits blink::CallbackFunctionBase.
(EventListener already supports incumbent realm.)

These four classes are no longer referenced from anywhere:
  blink::V8AbstractEventListener
  blink::V8EventListenerOrEventHandler
  blink::V8ErrorHandler
  blink::V8LazyEventListener
Although these are no longer necessary, this CL does not remove them
so that we can easily switch which classes to use in case new classes
contains some problems.

regarding  crbug.com/759461  :
OnErrorEventHandler for content attribute, which has different number
of arguments, gets supported by blink::JSEventHandler and
blink::JSEventHandlerForContentAttribute.

regarding  crbug.com/664676  :
|js_event| in the relevant realm of |event|'s target is created in
blink::JSBasedEventListener::handleEvent().

Bug:  872138 ,  849236 ,  759461 ,  664676 ,  606900 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I356734fc16611277ad9f3f279a676e7dc8083408
Reviewed-on: https://chromium-review.googlesource.com/c/1215512
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597054}
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/onerroreventhandler-expected.txt
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url-expected.txt
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-expected.txt
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error-expected.txt
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/WebKit/LayoutTests/fast/events/window-onerror-11-expected.txt
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/WebKit/LayoutTests/fast/performance/detached-event-timestamp.html
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_handler.h
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_listener.cc
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/js_event_listener.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
[delete] https://crrev.com/2555486fd96872f6b98f9ad54c541d7ee2b6fcb1/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/scripts/v8_attributes.py
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/scripts/v8_types.py
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/templates/methods.cpp.tmpl
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/dom/events/event_listener.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/dom/events/event_listener_map.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/dom/events/event_target.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/frame/dom_window.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/frame/dom_window.h
[add] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/html/event_handler.idl
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/html/html_body_element.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/html/html_frame_element_base.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/html/html_frame_set_element.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/inspector/thread_debugger.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/svg/svg_script_element.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/svg/svg_svg_element.cc
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/core/workers/worker_global_scope.h
[modify] https://crrev.com/1b2f95835607dbb9c6021df8893fb18f4c7aee9e/third_party/blink/renderer/platform/bindings/v8_private_property.h

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 9

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

commit 1f7b0a8b7bfd357608fe131746f2bca474cb74db
Author: Yuki Yamada <yukiy@google.com>
Date: Tue Oct 09 06:17:19 2018

Add JSBasedEventListener::GetEffectiveFunction()

This CL adds JSBasedEventListener::GetEffectiveFunction().
There was JSBasedEventListener::ListenerEffectiveFunction(), the static
method copied from ScriptEventListener::EventListenerEffectiveFunction().
This had two problems: trying to find "handleEvent" property even in the
case of EventHandler, and returning object's contractor if there is no
effective function.
Therefore this CL modifies this method to non-static one and make it
return appropriate value or undefined.
See: https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc?l=123&rcl=9f03ab9c6fef05c2d444af87ca2508ce2a69c4c6

Bug:  872138 
Change-Id: Id48af0b350735b0d7e532f9a9082c7114bf2d1a6
Reviewed-on: https://chromium-review.googlesource.com/c/1252227
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#597815}
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/WebKit/LayoutTests/http/tests/devtools/elements/event-listener-sidebar-expected.txt
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_event_handler.h
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_event_listener.cc
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/js_event_listener.h
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/bindings/core/v8/v8_event_listener_info.h
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/1f7b0a8b7bfd357608fe131746f2bca474cb74db/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Oct 9

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

commit 28689f7cc54c9469e0d7331ddd64f40fc428cdde
Author: Yuki Yamada <yukiy@google.com>
Date: Tue Oct 09 08:17:08 2018

Add JSBasedEventListener::GetSourceLocation()

This CL adds JSBasedEventListener::GetSourceLocation().
JSEventHandlerForContentAttribute can provide its SourceLocation even
if it cannot get compiled, so it overrides this method.

Bug:  872138 
Change-Id: I8d575f3e847d37b7eb202833971fb610c589dd8f
Reviewed-on: https://chromium-review.googlesource.com/c/1253317
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597837}
[modify] https://crrev.com/28689f7cc54c9469e0d7331ddd64f40fc428cdde/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
[modify] https://crrev.com/28689f7cc54c9469e0d7331ddd64f40fc428cdde/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
[modify] https://crrev.com/28689f7cc54c9469e0d7331ddd64f40fc428cdde/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc
[modify] https://crrev.com/28689f7cc54c9469e0d7331ddd64f40fc428cdde/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h
[modify] https://crrev.com/28689f7cc54c9469e0d7331ddd64f40fc428cdde/third_party/blink/renderer/core/dom/events/event_target.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Oct 11

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

commit 105b06a6b9144f94adac98efe66e59a762b47cf6
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Oct 11 09:33:52 2018

Remove old EventListener and EventHandler

This is a clean-up for previous CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1215512

After submitted the previous CL, these old classes are not used from
anywhere:
    blink::V8AbstractEventHandler
    blink::V8EventListenerOrEventHandler
    blink::V8ErrorHandler
    blink::V8LazyEventListener
Therefore, this CL removes them.

Bug:  872138 
Change-Id: I44e9026148e6db24f44b52c138523cce55eacd7d
Reviewed-on: https://chromium-review.googlesource.com/c/1273355
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#598707}
[modify] https://crrev.com/105b06a6b9144f94adac98efe66e59a762b47cf6/third_party/blink/renderer/bindings/bindings.gni
[modify] https://crrev.com/105b06a6b9144f94adac98efe66e59a762b47cf6/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.cc
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_error_handler.cc
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_error_handler.h
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.cc
[delete] https://crrev.com/0494a9cc0874ca6b577a1b1d7a56455f587fc10e/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
[modify] https://crrev.com/105b06a6b9144f94adac98efe66e59a762b47cf6/third_party/blink/renderer/core/dom/events/event_listener.h

Status: Fixed (was: Started)
Project Member

Comment 29 by bugdroid1@chromium.org, Oct 11

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

commit 92365e6a1df83c1ec7ab2f8d2d7a616bcf23a71e
Author: Yuki Yamada <yukiy@google.com>
Date: Thu Oct 11 13:11:27 2018

Remove unnecessary HandleScope

This is a clean-up for previous CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1215512

Bug:  872138 
Change-Id: I2be8ab98d9d42404936779bb55cba1a0c5f00742
Reviewed-on: https://chromium-review.googlesource.com/c/1275989
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#598735}
[modify] https://crrev.com/92365e6a1df83c1ec7ab2f8d2d7a616bcf23a71e/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc

Project Member

Comment 30 by bugdroid1@chromium.org, Oct 12

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

commit 7d87839234fceb435e01ca49cf72096ef6691599
Author: Yuki Yamada <yukiy@google.com>
Date: Fri Oct 12 06:29:00 2018

Rename scopes and context in JSBasedEventListener::handleEvent()

This CL renames some ambiguous name of scope and context in
JSBasedEventListener::handleEvent().

Split from another one:
https://chromium-review.googlesource.com/c/chromium/src/+/1270300

Bug:  872138 
Change-Id: I8e772ecdc283fd1585566cf56a52170b777f4608
Reviewed-on: https://chromium-review.googlesource.com/c/1277135
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#599114}
[modify] https://crrev.com/7d87839234fceb435e01ca49cf72096ef6691599/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 12

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

commit 1d2509fc2ebc7c9848726c1b208483e1e1efc485
Author: Yuki Yamada <yukiy@google.com>
Date: Fri Oct 12 09:45:43 2018

Added security check for cross origin

This CL adds a security check for cross origin with
BindingSecurity::ShouldAllowAccessToCreationContext().
|js_event|, a V8 wrapper object for event object, must be created in the
relevant realm of the event target, but it is possible that listener's
relevant context cannnot access the relevant realm of event target
(ex. when Document.origin is changed).
We have to check this before invoking event listener.

Bug:  872138 ,  884516 
Change-Id: Ic5d0c8e6cda4db57a2097ce230e75cc59905b350
Reviewed-on: https://chromium-review.googlesource.com/c/1270300
Commit-Queue: Yuki Yamada <yukiy@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599154}
[modify] https://crrev.com/1d2509fc2ebc7c9848726c1b208483e1e1efc485/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc

Sign in to add a comment