Bug 207641 - Entry realm for promise jobs is incorrect
Summary: Entry realm for promise jobs is incorrect
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2020-02-12 10:01 PST by Domenic Denicola
Modified: 2024-05-07 08:23 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Domenic Denicola 2020-02-12 10:01:10 PST
https://wpt.live/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html tests the entry (used in, for example, determining the base URL for window.open()) incorrect for promise jobs. (Both promise reaction jobs, and promise resolve thenable jobs.)

It should be derived from the realm of the function in question, as it is for other web platform callbacks. However, this does not appear to be what WebKit does.

The spec governing this is in https://html.spec.whatwg.org/multipage/webappapis.html#enqueuejob(queuename,-job,-arguments) step 3, which was admittedly added very recently, in https://github.com/whatwg/html/pull/5212.

Firefox matches the spec entirely. Chrome has a bug in the promise resolve thenable job case, but matches the spec for the promise reaction job case.
Comment 1 Radar WebKit Bug Importer 2020-02-13 10:14:12 PST
<rdar://problem/59427516>