| Index: components/dom_distiller/ios/distiller_page_ios.mm
|
| diff --git a/components/dom_distiller/ios/distiller_page_ios.mm b/components/dom_distiller/ios/distiller_page_ios.mm
|
| index 4d04aa66a24c55cc5a4a188aa785d7a9edbe5b6e..bdf41087079c5c68539af796214980b3beee25da 100644
|
| --- a/components/dom_distiller/ios/distiller_page_ios.mm
|
| +++ b/components/dom_distiller/ios/distiller_page_ios.mm
|
| @@ -51,6 +51,19 @@ DistillerPageIOS::DistillerPageIOS(web::BrowserState* browser_state)
|
| DistillerPageIOS::~DistillerPageIOS() {
|
| }
|
|
|
| +bool DistillerPageIOS::StringifyOutput() {
|
| + // UIWebView requires JavaScript to return a single string value.
|
| + return true;
|
| +}
|
| +
|
| +bool DistillerPageIOS::CreateNewContext() {
|
| + // UIWebView's JavaScript engine has a bug that causes crashes when
|
| + // creating a separate window object, so allow the script to run directly
|
| + // in the window until a better solution is created.
|
| + // TODO(kkhorimoto): investigate whether this is necessary for WKWebView.
|
| + return false;
|
| +}
|
| +
|
| void DistillerPageIOS::DistillPageImpl(const GURL& url,
|
| const std::string& script) {
|
| if (!url.is_valid() || !script.length())
|
|
|