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

Unified Diff: java/org/chromium/distiller/DomUtil.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 | « java/org/chromium/distiller/DomDistiller.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/DomUtil.java
diff --git a/java/org/chromium/distiller/DomUtil.java b/java/org/chromium/distiller/DomUtil.java
index 91aabde47318504a08c1e51fc2aea35a7230f3e4..d0bcb1bfd7330c1cc8c56be59fdbc6320918284f 100644
--- a/java/org/chromium/distiller/DomUtil.java
+++ b/java/org/chromium/distiller/DomUtil.java
@@ -112,8 +112,9 @@ public class DomUtil {
}-*/;
public static native double getTime() /*-{
- // window.performance is unavailable in Gwt's dev environment.
- if (window.performance) {
+ // window.performance is unavailable in Gwt's dev environment and even referencing it on iOS
+ // causes a crash.
+ if ((typeof distiller_on_ios === 'undefined' || !distiller_on_ios) && window.performance) {
return window.performance.now();
}
return Date.now();
« no previous file with comments | « java/org/chromium/distiller/DomDistiller.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698