RESOLVED FIXED 230941
Some WebIDL operations / attributes incorrectly use _current_ realm instead of _relevant_
https://bugs.webkit.org/show_bug.cgi?id=230941
Summary Some WebIDL operations / attributes incorrectly use _current_ realm instead o...
Alexey Shvayka
Reported 2021-09-29 02:10:59 PDT
Some WebIDL operations / attributes incorrectly use _current_ realm instead of _relevant_
Attachments
Patch (38.57 KB, patch)
2021-09-29 02:37 PDT, Alexey Shvayka
no flags
Patch for landing (50.63 KB, patch)
2021-12-10 17:03 PST, Alexey Shvayka
no flags
Alexey Shvayka
Comment 1 2021-09-29 02:37:14 PDT
EWS Watchlist
Comment 2 2021-09-29 02:38:09 PDT
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
Radar WebKit Bug Importer
Comment 3 2021-09-29 09:54:18 PDT
Sam Weinig
Comment 4 2021-10-16 09:36:24 PDT
Comment on attachment 439585 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439585&action=review > Source/WebCore/ChangeLog:22 > + Most of the remaining [CallWith=GlobalObject] instances are correctly used for > + converting JS arguments to WebIDL values; the rest, along with _current_ Document > + and ScriptExecutionContext, either match the spec or replacing them with _relevant_ > + global object is not directly observable (see condition #3). It would be great to have some guidance to others in the future that need to figure out which the correct document/globalObject,scriptExecutionContext is the right one to use (though I don't have a great idea where to put this guidance).
Sam Weinig
Comment 5 2021-10-16 09:38:20 PDT
Perhaps also remaining the non-prefixed ones to use Current/Entry/etc prefixes would help, since people would feel they need to understand the concept before picking.
Alexey Shvayka
Comment 6 2021-10-16 09:50:57 PDT
(In reply to Sam Weinig from comment #5) Thanks for review! > Perhaps also remaining the non-prefixed ones to use Current/Entry/etc > prefixes would help, since people would feel they need to understand the > concept before picking. Yeah, that is the plan. Having _current_ by default, for non-prefixed values, is prone to introducing incompatibilities. For now I will add a spec link to both IDLAttributes.json and CodeGeneratorJS.pm; WHATWG editors did a great job explaining the concepts.
Sam Weinig
Comment 7 2021-11-15 09:02:31 PST
(In reply to Alexey Shvayka from comment #6) > (In reply to Sam Weinig from comment #5) > > Thanks for review! > > > Perhaps also remaining the non-prefixed ones to use Current/Entry/etc > > prefixes would help, since people would feel they need to understand the > > concept before picking. > > Yeah, that is the plan. Having _current_ by default, for non-prefixed > values, is prone to introducing incompatibilities. > > For now I will add a spec link to both IDLAttributes.json and > CodeGeneratorJS.pm; WHATWG editors did a great job explaining the concepts. Sounds great. (The more we can use spec names in our code, the better in my book. I would love to see more done in this area, especially in the area of JSC functions that WebCore bindings have to interact with).
Alexey Shvayka
Comment 8 2021-12-10 17:03:58 PST
Created attachment 446847 [details] Patch for landing
Alexey Shvayka
Comment 9 2021-12-10 17:05:53 PST
(In reply to Alexey Shvayka from comment #8) > Created attachment 446847 [details] > Patch for landing Also added bindings tests for newly added Relevant* values.
EWS
Comment 10 2021-12-10 18:27:51 PST
Committed r286895 (245123@main): <https://commits.webkit.org/245123@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 446847 [details].
Alexey Shvayka
Comment 11 2022-02-04 06:31:17 PST
(In reply to Sam Weinig from comment #5) > Perhaps also remaining the non-prefixed ones to use Current/Entry/etc > prefixes would help, since people would feel they need to understand the > concept before picking. Hey Sam, that change is now up for available for review: https://bugs.webkit.org/show_bug.cgi?id=236137. Thanks!
Note You need to log in before you can comment on or make changes to this bug.