Bug 145677

Summary: Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, dstockwell, esprehn+autocc, kangil.han, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2015-06-04 17:25:11 PDT
Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
Comment 1 Simon Fraser (smfr) 2015-06-04 17:30:23 PDT
Created attachment 254318 [details]
Patch
Comment 2 Simon Fraser (smfr) 2015-06-04 17:30:48 PDT
rdar://problem/20698280
Comment 3 Darin Adler 2015-06-04 17:37:14 PDT
Comment on attachment 254318 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254318&action=review

> Source/WebCore/ChangeLog:23
> +        Hard to make a test because this is timing sensitive.

No way at all? Seems so likely someone will re-break this!

> Source/WebCore/dom/EventDispatcher.cpp:344
> +    event->setTarget(target);
> +    if (!event->target())
> +        return true;

Seems a little strange to set the null target on the event before returning. Is that better than returning and not setting the target at all?

> Source/WebCore/dom/EventDispatcher.cpp:433
> +                m_path.append(std::make_unique<MouseOrFocusEventContext>(node, currentTarget, target));

Should we be doing this if currentTarget is null?

> Source/WebCore/dom/EventDispatcher.cpp:436
> +                m_path.append(std::make_unique<TouchEventContext>(node, currentTarget, target));

Should we be doing this if currentTarget is null?

> Source/WebCore/dom/EventDispatcher.cpp:439
> +                m_path.append(std::make_unique<EventContext>(node, currentTarget, target));

Should we be doing this if currentTarget is null?

> Source/WebCore/page/animation/AnimationController.cpp:112
> +    m_elementChangesToDispatch.removeAllMatching([element] (const Ref<Element>& currElement) {
> +        return &currElement.get() == element;
> +    });

Could we call it otherElement rather than currElement? Nicer to use words than word fragments.
Comment 4 WebKit Commit Bot 2015-06-04 18:24:23 PDT
Comment on attachment 254318 [details]
Patch

Clearing flags on attachment: 254318

Committed r185232: <http://trac.webkit.org/changeset/185232>
Comment 5 WebKit Commit Bot 2015-06-04 18:24:28 PDT
All reviewed patches have been landed.  Closing bug.