Removed some sources of panic from script thread and devtools, using Option values instead to indicate when a pipeline context is missing where appropriate. Additionally, removed erroneous method get_browsing_context.

This commit is contained in:
David Raifaizen 2016-07-25 20:34:47 -04:00
parent 4b78b9adab
commit 2475dc1d21
7 changed files with 89 additions and 54 deletions

View file

@ -738,7 +738,9 @@ impl Handler {
Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
Err(WebDriverJSError::Timeout) => Err(WebDriverError::new(ErrorStatus::Timeout, "")),
Err(WebDriverJSError::UnknownType) => Err(WebDriverError::new(
ErrorStatus::UnsupportedOperation, "Unsupported return type"))
ErrorStatus::UnsupportedOperation, "Unsupported return type")),
Err(WebDriverJSError::BrowsingContextNotFound) => Err(WebDriverError::new(
ErrorStatus::JavascriptError, "Pipeline id not found in browsing context"))
}
}