Changeset 272014 in webkit


Ignore:
Timestamp:
Jan 28, 2021, 8:32:49 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r271988): XRSession.end() promise is not resolved if PlatformXR::Device::supportsSessionShutdownNotification() returns false
https://bugs.webkit.org/show_bug.cgi?id=221080

Patch by Ada Chan <ada.chan@apple.com> on 2021-01-28
Reviewed by Chris Dumez.

Source/WebCore:

m_endPromise needs to be set before WebXRSession::shutdown() is called
since that can call WebXRSession::didCompleteShutdown() which will
resolve m_endPromise.

This issue caused a timeout in the cleanup step for a test like
imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::end):

LayoutTests:

Enable a test that was timing out, but now passes with the bug fix.

  • platform/mac/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r272009 r272014  
     12021-01-28  Ada Chan  <ada.chan@apple.com>
     2
     3        REGRESSION (r271988): XRSession.end() promise is not resolved if PlatformXR::Device::supportsSessionShutdownNotification() returns false
     4        https://bugs.webkit.org/show_bug.cgi?id=221080
     5
     6        Reviewed by Chris Dumez.
     7
     8        Enable a test that was timing out, but now passes with the bug fix.
     9
     10        * platform/mac/TestExpectations:
     11
    1122021-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/LayoutTests/platform/mac/TestExpectations

    r271988 r272014  
    22612261# WebXR tests
    22622262[ BigSur+ ] imported/w3c/web-platform-tests/webxr/xrSession_end.https.html [ Pass ]
     2263[ BigSur+ ] imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https.html [ Pass ]
    22632264[ BigSur+ ] http/wpt/webxr [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r272012 r272014  
     12021-01-28  Ada Chan  <ada.chan@apple.com>
     2
     3        REGRESSION (r271988): XRSession.end() promise is not resolved if PlatformXR::Device::supportsSessionShutdownNotification() returns false
     4        https://bugs.webkit.org/show_bug.cgi?id=221080
     5
     6        Reviewed by Chris Dumez.
     7
     8        m_endPromise needs to be set before WebXRSession::shutdown() is called
     9        since that can call WebXRSession::didCompleteShutdown() which will
     10        resolve m_endPromise.
     11
     12        This issue caused a timeout in the cleanup step for a test like
     13        imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.
     14
     15        * Modules/webxr/WebXRSession.cpp:
     16        (WebCore::WebXRSession::end):
     17
    1182021-01-28  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp

    r271988 r272014  
    391391        return Exception { InvalidStateError, "Cannot end a session more than once"_s };
    392392
     393    ASSERT(!m_endPromise);
     394    m_endPromise = WTFMove(promise);
     395
    393396    // 1. Let promise be a new Promise.
    394397    // 2. Shut down the target XRSession object.
     
    398401    // 3.1 Wait until any platform-specific steps related to shutting down the session have completed.
    399402    // 3.2 Resolve promise.
    400     ASSERT(!m_endPromise);
    401     m_endPromise = WTFMove(promise);
    402 
    403403    // 4. Return promise.
    404404    return { };
Note: See TracChangeset for help on using the changeset viewer.