[webkit-reviews] review granted: [Bug 209862] ASSERTION FAILED: m_wrapper on fast/events/scoped/editing-commands.html : [Attachment 399959] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 21 09:47:34 PDT 2020


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 209862: ASSERTION FAILED: m_wrapper on
fast/events/scoped/editing-commands.html
https://bugs.webkit.org/show_bug.cgi?id=209862

Attachment 399959: Patch

https://bugs.webkit.org/attachment.cgi?id=399959&action=review




--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 399959
  --> https://bugs.webkit.org/attachment.cgi?id=399959
Patch

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

> Source/WebCore/dom/ScopedEventQueue.cpp:50
> +    ScopedEvent scopedEvent = { WTFMove(event), target };

3 ways to write this:

1: ScopedEvent scopedEvent { WTFMove(event), target };
2: ScopedEvent scopedEvent = { WTFMove(event), target };
3: auto scopedEvent = ScopedEvent { WTFMove(event), target };

Style (1) seems like the most "normal". Antti convinced me to use style (3) in
new WebKit code I am writing.

> Source/WebCore/dom/ScopedEventQueue.cpp:64
> +    Vector<ScopedEvent> queuedEvents = WTFMove(m_queuedEvents);

I suggest using auto here.

> Source/WebCore/dom/ScopedEventQueue.h:59
> +    void dispatchEvent(ScopedEvent&) const;

Why does this take a reference? Is this an in/out in some way?


More information about the webkit-reviews mailing list