mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement read methods on FileReaderSync
This commit is contained in:
parent
3e8caa4679
commit
0fdafb08c8
9 changed files with 277 additions and 104 deletions
|
@ -69,6 +69,8 @@ pub enum Error {
|
|||
TypeMismatch,
|
||||
/// InvalidModificationError DOMException
|
||||
InvalidModification,
|
||||
/// NotReadableError DOMException
|
||||
NotReadable,
|
||||
|
||||
/// TypeError JavaScript Error
|
||||
Type(String),
|
||||
|
@ -110,6 +112,7 @@ pub unsafe fn throw_dom_exception(cx: *mut JSContext, global: &GlobalScope, resu
|
|||
Error::QuotaExceeded => DOMErrorName::QuotaExceededError,
|
||||
Error::TypeMismatch => DOMErrorName::TypeMismatchError,
|
||||
Error::InvalidModification => DOMErrorName::InvalidModificationError,
|
||||
Error::NotReadable => DOMErrorName::NotReadableError,
|
||||
Error::Type(message) => {
|
||||
assert!(!JS_IsExceptionPending(cx));
|
||||
throw_type_error(cx, &message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue