mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Support unions of objects in overloads
Part of #20513, implementing the parts useful for WebGL.
This commit is contained in:
parent
4cf944eab8
commit
900a19058e
8 changed files with 37 additions and 89 deletions
|
@ -255,14 +255,6 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool)
|
|||
}
|
||||
}
|
||||
|
||||
/// Throw an exception to signal that a `JSVal` can not be converted to any of
|
||||
/// the types in an IDL union type.
|
||||
pub unsafe fn throw_not_in_union(cx: *mut JSContext, names: &'static str) {
|
||||
assert!(!JS_IsExceptionPending(cx));
|
||||
let error = format!("argument could not be converted to any of: {}", names);
|
||||
throw_type_error(cx, &error);
|
||||
}
|
||||
|
||||
/// Throw an exception to signal that a `JSObject` can not be converted to a
|
||||
/// given DOM type.
|
||||
pub unsafe fn throw_invalid_this(cx: *mut JSContext, proto_id: u16) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue