[webkit-reviews] review granted: [Bug 183619] MessagePort is not always destroyed on the right thread : [Attachment 335829] Fixing log

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 15 09:33:22 PDT 2018


Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 183619: MessagePort is not always destroyed on the right thread
https://bugs.webkit.org/show_bug.cgi?id=183619

Attachment 335829: Fixing log

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




--- Comment #7 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 335829
  --> https://bugs.webkit.org/attachment.cgi?id=335829
Fixing log

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

> Source/WebCore/dom/MessagePort.cpp:279
>	       innerHandler(WTFMove(messages));

Could you please ASSERT(isMainThread()); in here?

> Source/WebCore/dom/MessagePort.cpp:333
> +		   if (weakThis)

Could you please ASSERT(isMainThread()); in here?

> Source/WebCore/dom/MessagePort.h:113
> +    WeakPtr<MessagePort> createWeakPtr() { return
m_weakFactory.createWeakPtr(*this); }

My understanding is that the modern way is to not have this method and use
makeWeakPtr() to constructor your WeakPtr. You already have the
weakPtrFactory() getter above so it should work fine.


More information about the webkit-reviews mailing list