aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_bindings
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-03-25 10:08:45 -0400
committerGitHub <noreply@github.com>2025-03-25 14:08:45 +0000
commitf717f6b848fe77ee948424b82d4419dcc5666c52 (patch)
treef08336605e3d301b7eac70a1371b8cb71dfa84e4 /components/script_bindings
parentf65b697a5aa963c846fc2efd0019fbf983fddfac (diff)
downloadservo-f717f6b848fe77ee948424b82d4419dcc5666c52.tar.gz
servo-f717f6b848fe77ee948424b82d4419dcc5666c52.zip
script: Support converting JS values to Rc<Promise> with FromJSValConvertible. (#36097)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script_bindings')
-rw-r--r--components/script_bindings/codegen/Bindings.conf2
-rw-r--r--components/script_bindings/webidls/TestBinding.webidl1
2 files changed, 2 insertions, 1 deletions
diff --git a/components/script_bindings/codegen/Bindings.conf b/components/script_bindings/codegen/Bindings.conf
index 4fa998a84c3..d5b1dc5c281 100644
--- a/components/script_bindings/codegen/Bindings.conf
+++ b/components/script_bindings/codegen/Bindings.conf
@@ -490,7 +490,7 @@ DOMInterfaces = {
'Promise': {
'spiderMonkeyInterface': True,
- 'additionalTraits': ["crate::dom::promise::PromiseHelpers<Self>"]
+ 'additionalTraits': ["crate::dom::promise::PromiseHelpers<Self>", "js::conversions::FromJSValConvertibleRc"]
},
'Range': {
diff --git a/components/script_bindings/webidls/TestBinding.webidl b/components/script_bindings/webidls/TestBinding.webidl
index 88f1b4d51f7..92d95e4fe73 100644
--- a/components/script_bindings/webidls/TestBinding.webidl
+++ b/components/script_bindings/webidls/TestBinding.webidl
@@ -479,6 +479,7 @@ interface TestBinding {
sequence<sequence<long>> returnSequenceSequence();
undefined passUnionSequenceSequence((long or sequence<sequence<long>>) seq);
+ undefined passRecordPromise(record<DOMString, Promise<undefined>> arg);
undefined passRecord(record<DOMString, long> arg);
undefined passRecordWithUSVStringKey(record<USVString, long> arg);
undefined passRecordWithByteStringKey(record<ByteString, long> arg);