New issue
Advanced search Search tips

Issue 717191 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

EventDispatchMediator seems redundant, should be nuked.

Project Member Reported by mustaq@chromium.org, May 1 2017

Issue description

Currently before firing any DOM event, we create an EventDispatchMediator to perform an event-type specific task in DispatchEvent(). The extra memory allocation here seems unnecessary because the event object could simply "own" the type-specific work in a virtual dispatcher method.
 

Comment 1 Deleted

Labels: Hotlist-Input-Dev
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 21 2017

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

commit dd36316add75b494525eab19b86e4fa165f85fca
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Nov 21 19:06:43 2017

No EventDispatchMediator is the best EventDispatchMediator!

The EventDispatchMediator seems redundant.  It doesn't store
any state of its own, and is created (then destroyed) at
every event dispatch only to provide event-type specific
handling.  This CL eliminates the unnecessary memory
(de)allocation (thus reduces memory fragmentation) by 
handling type-specific tasks in event objects.

Bug:  717191 
Change-Id: I7c2bc14fe5d43a604c9af982f64947258d237eea
Reviewed-on: https://chromium-review.googlesource.com/755855
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518322}
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/Event.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/Event.h
[delete] https://crrev.com/9102a345655b00636064a2cee33e3b2c9c536d15/third_party/WebKit/Source/core/dom/events/EventDispatchMediator.cpp
[delete] https://crrev.com/9102a345655b00636064a2cee33e3b2c9c536d15/third_party/WebKit/Source/core/dom/events/EventDispatchMediator.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/EventDispatcher.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/EventDispatcher.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/EventPath.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/EventPath.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/ScopedEventQueue.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/dom/events/ScopedEventQueue.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/DragEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/DragEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/FocusEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/FocusEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/InputEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/InputEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/PointerEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/PointerEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/TouchEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/TouchEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/UIEvent.h
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/WheelEvent.cpp
[modify] https://crrev.com/dd36316add75b494525eab19b86e4fa165f85fca/third_party/WebKit/Source/core/events/WheelEvent.h

Comment 4 by mustaq@chromium.org, Nov 21 2017

Status: Fixed (was: Assigned)

Sign in to add a comment