From f717f6b848fe77ee948424b82d4419dcc5666c52 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 25 Mar 2025 10:08:45 -0400 Subject: script: Support converting JS values to Rc with FromJSValConvertible. (#36097) Signed-off-by: Josh Matthews --- components/script_bindings/codegen/Bindings.conf | 2 +- components/script_bindings/webidls/TestBinding.webidl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'components/script_bindings') 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"] + 'additionalTraits': ["crate::dom::promise::PromiseHelpers", "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> returnSequenceSequence(); undefined passUnionSequenceSequence((long or sequence>) seq); + undefined passRecordPromise(record> arg); undefined passRecord(record arg); undefined passRecordWithUSVStringKey(record arg); undefined passRecordWithByteStringKey(record arg); -- cgit v1.2.3