mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Throw a catchable exception from ThrowingConstructor.
This commit is contained in:
parent
08020603b1
commit
2a7b53aea7
3 changed files with 1044 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
|||
use dom::bindings::codegen::PrototypeList;
|
||||
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
|
||||
use dom::bindings::conversions::{FromJSValConvertible, IDLInterface};
|
||||
use dom::bindings::error::throw_type_error;
|
||||
use dom::bindings::global::{GlobalRef, GlobalField, WindowField, WorkerField};
|
||||
use dom::bindings::js::{JS, Temporary, Root};
|
||||
use dom::bindings::trace::Untraceable;
|
||||
|
@ -401,8 +402,8 @@ fn CreateInterfacePrototypeObject(cx: *mut JSContext, global: *mut JSObject,
|
|||
|
||||
/// A throwing constructor, for those interfaces that have neither
|
||||
/// `NoInterfaceObject` nor `Constructor`.
|
||||
pub extern fn ThrowingConstructor(_cx: *mut JSContext, _argc: c_uint, _vp: *mut JSVal) -> JSBool {
|
||||
// FIXME(#347) should trigger exception here
|
||||
pub extern fn ThrowingConstructor(cx: *mut JSContext, _argc: c_uint, _vp: *mut JSVal) -> JSBool {
|
||||
throw_type_error(cx, "Illegal constructor.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
[interfaces.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XMLHttpRequestUpload interface: existence and properties of interface object]
|
||||
[XMLHttpRequest interface: operation open(ByteString,DOMString)]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest interface: operation open(ByteString,DOMString,boolean,DOMString,DOMString)]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest interface: operation send([object Object\],[object Object\],[object Object\],[object Object\],[object Object\],[object Object\])]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest interface: operation overrideMimeType(DOMString)]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest interface: calling open(ByteString,DOMString) on new XMLHttpRequest() with too few arguments must throw TypeError]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue