Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: java/org/chromium/distiller/DomDistiller.java

Issue 1386363003: Fix crashes on iOS related to using window.performance and reading window.location.href in a UIWebV… (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Fix crashes on iOS related to using window.performance and reading window.location.href in a UIWebV… Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | java/org/chromium/distiller/DomUtil.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/DomDistiller.java
diff --git a/java/org/chromium/distiller/DomDistiller.java b/java/org/chromium/distiller/DomDistiller.java
index 37d86cacc245f97b5bfb6a75d17edd91cf60f92e..531122ebd464605cf40bd036fc8cf5824810ee14 100644
--- a/java/org/chromium/distiller/DomDistiller.java
+++ b/java/org/chromium/distiller/DomDistiller.java
@@ -47,7 +47,9 @@ public class DomDistiller {
result.addContentImages().setUrl(url);
}
- String original_url = options.hasOriginalUrl() ? options.getOriginalUrl() : Window.Location.getHref();
+ // iOS doesn't support reading window.location.href, so we use document.URL instead.
+ String original_url =
+ options.hasOriginalUrl() ? options.getOriginalUrl() : Document.get().getURL();
TimingInfo timingInfo = contentExtractor.getTimingInfo();
double stPaging = DomUtil.getTime();
result.setPaginationInfo(PagingLinksFinder.getPaginationInfo(original_url));
« no previous file with comments | « no previous file | java/org/chromium/distiller/DomUtil.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698