[webkit-changes] [WebKit/WebKit] 5cc2ef: Make MessagePort's close() set [[Detached]]

Chris Dumez noreply at github.com
Mon Sep 19 22:12:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5cc2efcf871d0bb2bfe202005f295f3537617e69
      https://github.com/WebKit/WebKit/commit/5cc2efcf871d0bb2bfe202005f295f3537617e69
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-09-19 (Mon, 19 Sep 2022)

  Changed paths:
    M LayoutTests/fast/events/message-port-clone-expected.txt
    M LayoutTests/fast/events/message-port-clone.html
    M LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.any.worker-expected.txt
    M Source/WebCore/bindings/js/SerializedScriptValue.cpp
    M Source/WebCore/dom/MessageChannel.cpp
    M Source/WebCore/dom/MessagePort.cpp
    M Source/WebCore/dom/MessagePort.h

  Log Message:
  -----------
  Make MessagePort's close() set [[Detached]]
https://bugs.webkit.org/show_bug.cgi?id=185078

Reviewed by Brent Fulgham.

Throw a DataCloneError when trying to serialize a MessagePort that has been detached / closed:
- https://github.com/whatwg/html/pull/3584

This aligns our behavior with Gecko and the HTML specification.

* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.any.worker-expected.txt:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):
* Source/WebCore/dom/MessageChannel.cpp:
(WebCore::MessageChannel::MessageChannel):
* Source/WebCore/dom/MessagePort.cpp:
(WebCore::MessagePort::close):
(WebCore::MessagePort::dispatchEvent):
(WebCore::MessagePort::virtualHasPendingActivity const):
* Source/WebCore/dom/MessagePort.h:

Canonical link: https://commits.webkit.org/254661@main




More information about the webkit-changes mailing list