Bug 1368377 - Use app context for GlobalHistory; r=me
authorJim Chen <nchen@mozilla.com>
Thu, 01 Jun 2017 15:07:16 -0400
changeset 361903 3005c1464a2c90a7a2f711caf6466d1ab15cc628
parent 361902 542348829591bffff44980cb5689c8a0a4bf80bb
child 361904 c77e79c09f1e6adf173e09ef829c96e507dbbb0d
push id31948
push userkwierso@gmail.com
push dateFri, 02 Jun 2017 00:27:01 +0000
treeherdermozilla-central@1e229cf8933b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1368377
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1368377 - Use app context for GlobalHistory; r=me Use getApplicationContext instead of the obsolete getContext in GlobalHistory.checkVisited. MozReview-Commit-ID: EbaFecEzNkh
mobile/android/base/java/org/mozilla/gecko/GlobalHistory.java
--- a/mobile/android/base/java/org/mozilla/gecko/GlobalHistory.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GlobalHistory.java
@@ -177,17 +177,18 @@ class GlobalHistory {
                 getInstance().update(context.getContentResolver(), db, uri, title);
             }
         });
     }
 
     /* protected */ void checkVisited(final String uri) {
         final String storedURI = ReaderModeUtils.stripAboutReaderUrl(uri);
 
-        final NotifierRunnable runnable = new NotifierRunnable(GeckoAppShell.getContext());
+        final NotifierRunnable runnable =
+                new NotifierRunnable(GeckoAppShell.getApplicationContext());
         mHandler.post(new Runnable() {
             @Override
             public void run() {
                 // this runs on the same handler thread as the processing loop,
                 // so no synchronization needed
                 mPendingUris.add(storedURI);
                 if (mProcessing) {
                     // there's already a runnable queued up or working away, so