Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 372ced794551688d9fc0c4552eca8b7c4ea07b8a
      
https://github.com/WebKit/WebKit/commit/372ced794551688d9fc0c4552eca8b7c4ea07b8a
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-03-24 (Tue, 24 Mar 2026)

  Changed paths:
    M Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp
    M Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h
    M Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.idl
    M Source/WebCore/Modules/streams/ReadableByteStreamController.cpp
    M Source/WebCore/Modules/streams/StreamTeeUtilities.cpp
    M Source/WebCore/Modules/streams/TransformStream.cpp
    M Source/WebCore/Modules/streams/TransformStream.h
    M Source/WebCore/Modules/webaudio/AudioBuffer.cpp
    M Source/WebCore/Modules/webaudio/AudioWorkletNode.cpp
    M Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp
    M Source/WebCore/bindings/js/DOMWrapperWorld.cpp
    M Source/WebCore/bindings/js/DOMWrapperWorld.h
    M Source/WebCore/bindings/js/JSDOMWrapper.cpp
    M Source/WebCore/bindings/js/JSErrorEventCustom.cpp
    M Source/WebCore/bindings/js/JSErrorHandler.cpp
    M Source/WebCore/bindings/js/JSMediaControlsHostCustom.cpp
    M Source/WebCore/bindings/js/JSPopStateEventCustom.cpp
    M Source/WebCore/bindings/js/JSValueInWrappedObject.h
    M Source/WebCore/dom/AbortSignal.cpp
    M Source/WebCore/dom/AbortSignal.h
    M Source/WebCore/dom/CustomEvent.cpp
    M Source/WebCore/dom/CustomEvent.h
    M Source/WebCore/dom/CustomEvent.idl
    M Source/WebCore/dom/ErrorEvent.cpp
    M Source/WebCore/dom/ErrorEvent.h
    M Source/WebCore/dom/ErrorEvent.idl
    M Source/WebCore/dom/InternalObserverLast.cpp
    M Source/WebCore/dom/InternalObserverReduce.cpp
    M Source/WebCore/dom/MessageEvent.cpp
    M Source/WebCore/dom/MessageEvent.h
    M Source/WebCore/dom/MessageEvent.idl
    M Source/WebCore/dom/PopStateEvent.cpp
    M Source/WebCore/dom/PopStateEvent.h
    M Source/WebCore/dom/PopStateEvent.idl
    M Source/WebCore/dom/PromiseRejectionEvent.cpp
    M Source/WebCore/dom/PromiseRejectionEvent.h
    M Source/WebCore/dom/PromiseRejectionEvent.idl
    M Source/WebCore/dom/RejectedPromiseTracker.cpp
    M Source/WebCore/dom/ScriptExecutionContext.cpp
    M Source/WebCore/page/NavigateEvent.cpp
    M Source/WebCore/page/NavigateEvent.h
    M Source/WebCore/page/NavigateEvent.idl
    M Source/WebCore/page/Navigation.cpp
    M Source/WebCore/page/Navigation.h
    M Source/WebCore/page/Navigation.idl
    M Source/WebCore/testing/EventTargetForTesting.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/workers/WorkerMessagingProxy.cpp
    M Source/WebCore/workers/service/ExtendableMessageEvent.cpp
    M Source/WebCore/workers/shared/SharedWorkerObjectConnection.cpp

  Log Message:
  -----------
  JSValueInWrappedObject should store world of the lexical global object
https://bugs.webkit.org/show_bug.cgi?id=310622
rdar://173228040

Reviewed by Keith Miller and Chris Dumez.

This is a preparation of introducing realm-less objects which is
introduced in V8 / blink. This patch improves JSValueInWrappedObject
by storing lexical global object's world, and using this world for
access control for this value. And threading lexical global object to
the places using JSValueInWrappedObject. This fixes
JSValueInWrappedObject: we would like to control the value access based
on which world sets this value. Not the world of the value itself as you
can create an object in the other world and setting it to the field from
the different realm still.

We also make sure that ErrorEvent / PopStateEvent are following to the
typical pattern of JSValueInWrappedObject so that we can easily
introduce the uniform approach for realm-less objects.

After this patch, we will introduce realm-less object, which does not
have tied realm (JSGlobalObject) in its Structure. This is Wasm GC
Struct / Array in V8 and this is necessary for the future thread-shared
objects in wasm.

* Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
(WebCore::PaymentMethodChangeEvent::PaymentMethodChangeEvent):
* Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h:
* Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.idl:
* Source/WebCore/Modules/streams/ReadableByteStreamController.cpp:
(WebCore::ReadableByteStreamController::ReadableByteStreamController):
(WebCore::ReadableByteStreamController::storeError):
* Source/WebCore/Modules/streams/StreamTeeUtilities.cpp:
* Source/WebCore/Modules/streams/TransformStream.cpp:
(WebCore::TransformStream::create):
(WebCore::TransformStream::TransformStream):
* Source/WebCore/Modules/streams/TransformStream.h:
* Source/WebCore/Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::getChannelData):
* Source/WebCore/Modules/webaudio/AudioWorkletNode.cpp:
(WebCore::AudioWorkletNode::fireProcessorErrorOnMainThread):
* Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp:
(WebCore::AudioWorkletProcessor::buildJSArguments):
* Source/WebCore/bindings/js/DOMWrapperWorld.cpp:
(WebCore::isWorldCompatible): Deleted.
* Source/WebCore/bindings/js/DOMWrapperWorld.h:
* Source/WebCore/bindings/js/JSDOMWrapper.cpp:
(WebCore::cloneAcrossWorlds):
* Source/WebCore/bindings/js/JSErrorEventCustom.cpp:
(WebCore::JSErrorEvent::error const):
(WebCore::JSErrorEvent::visitAdditionalChildrenInGCThread):
* Source/WebCore/bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* Source/WebCore/bindings/js/JSMediaControlsHostCustom.cpp:
(WebCore::JSMediaControlsHost::setController):
* Source/WebCore/bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state const):
(WebCore::JSPopStateEvent::visitAdditionalChildrenInGCThread):
* Source/WebCore/bindings/js/JSValueInWrappedObject.h:
(WebCore::JSValueInWrappedObject::JSValueInWrappedObject):
(WebCore::JSValueInWrappedObject::setValueInternal):
(WebCore::JSValueInWrappedObject::setWorld):
(WebCore::JSValueInWrappedObject::setWeakly):
(WebCore::JSValueInWrappedObject::set):
(WebCore::JSValueInWrappedObject::clear):
(WebCore::JSValueInWrappedObject::isWorldCompatible const):
(WebCore::cachedPropertyValue):
* Source/WebCore/dom/AbortSignal.cpp:
(WebCore::AbortSignal::abort):
(WebCore::AbortSignal::AbortSignal):
(WebCore::AbortSignal::signalAbort):
(WebCore::AbortSignal::markAborted):
* Source/WebCore/dom/AbortSignal.h:
* Source/WebCore/dom/CustomEvent.cpp:
(WebCore::CustomEvent::CustomEvent):
(WebCore::CustomEvent::create):
(WebCore::CustomEvent::initCustomEvent):
* Source/WebCore/dom/CustomEvent.h:
* Source/WebCore/dom/CustomEvent.idl:
* Source/WebCore/dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
(WebCore::ErrorEvent::error): Deleted.
(WebCore::ErrorEvent::trySerializeError): Deleted.
* Source/WebCore/dom/ErrorEvent.h:
* Source/WebCore/dom/ErrorEvent.idl:
* Source/WebCore/dom/InternalObserverLast.cpp:
* Source/WebCore/dom/InternalObserverReduce.cpp:
* Source/WebCore/dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::m_jsData):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::initMessageEvent):
* Source/WebCore/dom/MessageEvent.h:
* Source/WebCore/dom/MessageEvent.idl:
* Source/WebCore/dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::PopStateEvent):
(WebCore::PopStateEvent::create):
(WebCore::PopStateEvent::trySerializeState): Deleted.
* Source/WebCore/dom/PopStateEvent.h:
* Source/WebCore/dom/PopStateEvent.idl:
* Source/WebCore/dom/PromiseRejectionEvent.cpp:
(WebCore::PromiseRejectionEvent::PromiseRejectionEvent):
* Source/WebCore/dom/PromiseRejectionEvent.h:
* Source/WebCore/dom/PromiseRejectionEvent.idl:
* Source/WebCore/dom/RejectedPromiseTracker.cpp:
(WebCore::RejectedPromiseTracker::reportUnhandledRejections):
(WebCore::RejectedPromiseTracker::reportRejectionHandled):
* Source/WebCore/dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* Source/WebCore/page/NavigateEvent.cpp:
(WebCore::NavigateEvent::NavigateEvent):
(WebCore::NavigateEvent::create):
* Source/WebCore/page/NavigateEvent.h:
* Source/WebCore/page/NavigateEvent.idl:
* Source/WebCore/page/Navigation.cpp:
(WebCore::NavigationAPIMethodTracker::create):
(WebCore::NavigationAPIMethodTracker::NavigationAPIMethodTracker):
(WebCore::Navigation::maybeSetUpcomingNonTraversalTracker):
(WebCore::Navigation::addUpcomingTraverseAPIMethodTracker):
(WebCore::Navigation::reload):
(WebCore::Navigation::navigate):
(WebCore::Navigation::performTraversal):
(WebCore::Navigation::traverseTo):
(WebCore::Navigation::back):
(WebCore::Navigation::forward):
(WebCore::Navigation::abortOngoingNavigation):
(WebCore::Navigation::innerDispatchNavigateEvent):
* Source/WebCore/page/Navigation.h:
* Source/WebCore/page/Navigation.idl:
* Source/WebCore/testing/EventTargetForTesting.cpp:
(WebCore::EventTargetForTesting::sendInternalMessage):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isFromCurrentWorld const):
* Source/WebCore/workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
* Source/WebCore/workers/service/ExtendableMessageEvent.cpp:
(WebCore::createWrapperAndSetData):
* Source/WebCore/workers/shared/SharedWorkerObjectConnection.cpp:
(WebCore::SharedWorkerObjectConnection::postErrorToWorkerObject):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to