[Webkit-unassigned] [Bug 229020] New: ApplePaySession methods hold main thread for 250ms

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 11 20:58:02 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229020

            Bug ID: 229020
           Summary: ApplePaySession methods hold main thread for 250ms
           Product: WebKit
           Version: Other
          Hardware: Mac (Apple Silicon)
                OS: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: finesserus at gmail.com

I face the bug in Safari 15.0 (17612.1.26.1.3) on macOS 12.0 Beta (21A5304g) on MacBook Air 2020 (M1).
I don't face the bug in Safari 15.0 on iOS 15.0 Beta (19A5307g) on iPhone 12 mini.
I don't face the bug in Safari TP 15.0 (16612.1.24.11.7) on macOS 11.5.1 on macBook Pro 15" 2015.
I don't face the bug in Safari 13.1.2 on iOS 13.6.1 on iPhone SE (1st gen).

Calling ApplePaySession.canMakePayments() holds the main JS thread for 250ms regardless. It takes less than 15ms in other versions of Safari.

Calling ApplePaySession.canMakePaymentsWithActiveCard('anyid') holds the main JS thread for 250ms when checking for Apple Pay is disabled in Safari settings. It takes less than 1ms in other versions of Safari (the synchronous part, no the promise resolution time).

In order to reproduce, open any HTTPS page and run the following code in the browser console:

    console.time('canMakePayments');
    console.log(ApplePaySession.canMakePayments());
    console.timeEnd('canMakePayments');
    console.time('canMakePaymentsWithActiveCard promise initialization');
    ApplePaySession.canMakePaymentsWithActiveCard('anyid').then(() => {
      console.timeEnd('canMakePaymentsWithActiveCard promise resolution');
    });
    console.timeEnd('canMakePaymentsWithActiveCard promise initialization');
    console.time('canMakePaymentsWithActiveCard promise resolution');

The "canMakePayments" and "canMakePaymentsWithActiveCard promise initialization" durations are expected to be small (<16ms) in order not to block the browser.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210812/07b5a616/attachment.htm>


More information about the webkit-unassigned mailing list