Expose some web APIs on Shadow Realms and Worklets
Created attachment 450181 [details] Patch
<rdar://problem/88456764>
Created attachment 453421 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Created attachment 453426 [details] Patch
Comment on attachment 453426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453426&action=review > Source/WebCore/ChangeLog:10 > + Mark a handful of web APIs as Exposed=*, making them visible in shadow > + realm contexts. The existence of these APIs is checked by new idlharness-shadowrealm > + tests in WPT, which have been imported. Is [Exposed=*] part of the WebIDL specification? It does not seem particularly forward looking.
Hi Darin, Exposed=* was added fairly recently, in January: https://webidl.spec.whatwg.org/#Exposed https://github.com/whatwg/webidl/pull/526 AIUI it's probably not going to be used on many more interfaces.
Comment on attachment 453426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453426&action=review It's hard to argue with the improvements in the WPT results --- LGTM > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1975 > + return $contextExposures eq "*"; Personally, I'd be happy if there was a comment here like the one in the ChangeLog explaining why this is needed, so future readers don't need to find the ChangeLog entry to understand it. It isn't entirely intuitive, IMHO. > Also required adjustment to CodeGeneratorJS.pm since it refused to > generate a runtime check when a member is exposed less than the interface it > appears on *and* in more than one scope.
Created attachment 454509 [details] Patch
Comment on attachment 454509 [details] Patch r=me
Comment on attachment 454509 [details] Patch Thanks, Yusuke :)
Committed r291295 (248434@main): <https://commits.webkit.org/248434@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454509 [details].
Comment on attachment 454509 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454509&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1974 > + # if the interface exposure list isn't an arary, wrap it in one; unless the Typo here in the word "array".