See https://github.com/whatwg/dom/issues/334 for the discussion that led to this, https://github.com/whatwg/dom/pull/407 for the DOM Standard change, and https://github.com/web-platform-tests/wpt/pull/10329/files for tests that Chrome fails.
yukishiino@, I guess you are the best person to work on this. :)
Issue 223749 has been merged into this issue.
The current plan is that a coming intern will refactor event listeners this summer (in Japan), and after that, it should be pretty easy to fix this issue.
Sounds good.
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
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
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
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
Comment 1 by hayato@chromium.org
, Jun 5 2018Components: -Blink>DOM Blink>Bindings
Owner: yukishiino@chromium.org
Status: Assigned (was: Unconfirmed)