Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
servo: Merge #19180 - Fix binding generation for overloaded functions…
… with optionals and de… (from ferjm:optional.overloaded.webidl); r=jdm …fault values The generated bindings for an interface like this: ```webidl void someFunction(Foo foo, optional long a = 0, optional long b = 1); void someFunction(Bar bar, optional long a = 0); ``` are failing to build with an error like: ```bash error[E0425]: cannot find function `Throw` in this scope --> /Users/ferjm/dev/mozilla/servo/target/debug/build/script-7b1a12ddd08207e3/out/Bindings/TestBindingBinding.rs:15395:24 | 15395 | return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS); | ^^^^^ not found in this scope error[E0425]: cannot find value `NS_ERROR_XPC_BAD_CONVERT_JS` in this scope --> /Users/ferjm/dev/mozilla/servo/target/debug/build/script-7b1a12ddd08207e3/out/Bindings/TestBindingBinding.rs:15395:34 | 15395 | return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0425]: cannot find function `Throw` in this scope --> /Users/ferjm/dev/mozilla/servo/target/debug/build/script-7b1a12ddd08207e3/out/Bindings/TestBindingBinding.rs:15468:24 | 15468 | return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS); | ^^^^^ not found in this scope error[E0425]: cannot find value `NS_ERROR_XPC_BAD_CONVERT_JS` in this scope --> /Users/ferjm/dev/mozilla/servo/target/debug/build/script-7b1a12ddd08207e3/out/Bindings/TestBindingBinding.rs:15468:34 | 15468 | return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error: aborting due to 4 previous errors error: Could not compile `script`. ``` - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are tests for these changes ** Note that this depends** on servo/rust-mozjs#379 Source-Repo: https://github.com/servo/servo Source-Revision: 9d055522d355b711c7837ba5997089ba8a7641ae --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : f39f5160149998e40ae2a740706c4385b46f8415
- Loading branch information