Bug 1506599 - Add @AnyThread annotation to GeckoWebExecutor r=agi
authorJames Willcox <snorp@snorp.net>
Mon, 12 Nov 2018 15:31:56 +0000
changeset 445889 039f38a78b19baa65c162531976c67b42c98fcde
parent 445888 577c34da7b73f1d33026ff0c768ace3e893c34b8
child 445890 b202178963600848d8357f73136221db228432a3
push id35028
push usercsabou@mozilla.com
push dateMon, 12 Nov 2018 21:54:15 +0000
treeherdermozilla-central@05331fb8f533 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagi
bugs1506599
milestone65.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 1506599 - Add @AnyThread annotation to GeckoWebExecutor r=agi Differential Revision: https://phabricator.services.mozilla.com/D11652
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
@@ -1,16 +1,17 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * vim: ts=4 sw=4 expandtab:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.geckoview;
 
+import android.support.annotation.AnyThread;
 import android.support.annotation.IntDef;
 import android.support.annotation.NonNull;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
@@ -30,16 +31,17 @@ import org.mozilla.gecko.annotation.Wrap
  *             .header("Accept", "application/json")
  *             .build());
  *
  *     response.then(response -&gt; {
  *         // Do something with response
  *     });
  * </pre>
  */
+@AnyThread
 public class GeckoWebExecutor {
     // We don't use this right now because we access GeckoThread directly, but
     // it's future-proofing for a world where we allow multiple GeckoRuntimes.
     private final GeckoRuntime mRuntime;
 
     @WrapForJNI(dispatchTo = "gecko", stubName = "Fetch")
     private static native void nativeFetch(WebRequest request, int flags, GeckoResult<WebResponse> result);