mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use TypeError instead of InvalidState for exception.
Addresses Issue #23202
This commit is contained in:
parent
1e158bbfae
commit
15c06b1b26
5 changed files with 10 additions and 29 deletions
|
@ -680,7 +680,9 @@ fn run_upgrade_constructor(
|
|||
return Err(Error::JSFailed);
|
||||
}
|
||||
if !same {
|
||||
return Err(Error::InvalidState);
|
||||
return Err(Error::Type(
|
||||
"Returned element is not SameValue as the upgraded element".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue