Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script: a couple DOM conversion fixes #18539

Merged
merged 3 commits into from Sep 17, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

script: Add a comment about some conversion that looks fishy.

  • Loading branch information
emilio committed Sep 17, 2017
commit 5281fc1a440a6a179f7f8cb4788a9694904d0520
@@ -84,13 +84,13 @@ impl<T: Float + FromJSValConvertible<Config=()>> FromJSValConvertible for Finite
value: HandleValue,
option: ())
-> Result<ConversionResult<Finite<T>>, ()> {
let result = match FromJSValConvertible::from_jsval(cx, value, option) {
Ok(ConversionResult::Success(v)) => v,
Ok(ConversionResult::Failure(error)) => {
let result = match FromJSValConvertible::from_jsval(cx, value, option)? {
ConversionResult::Success(v) => v,
ConversionResult::Failure(error) => {
// FIXME(emilio): Why throwing instead of propagating the error?
throw_type_error(cx, &error);
return Err(());
}
_ => return Err(()),
};
match Finite::new(result) {
Some(v) => Ok(ConversionResult::Success(v)),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.