Backed out changeset 95aa3315d2c9 (bug 1517846) for android build bustage at /builds/worker/workspace/build/src/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoJarReader.java on a CLOSED TREE
authorDaniel Varga <dvarga@mozilla.com>
Tue, 15 Jan 2019 21:29:51 +0200
changeset 513950 f1d185974426691abd0473f7c8e8d52ea8d2b0d8
parent 513949 83f6feddbba0eb52115774fef93c4ed4274161aa
child 513951 b8346afda87b49f05fabb39259945666a8ae9260
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1517846
milestone66.0a1
backs out95aa3315d2c96c782859ca6755107b1fda41454f
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
Backed out changeset 95aa3315d2c9 (bug 1517846) for android build bustage at /builds/worker/workspace/build/src/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoJarReader.java on a CLOSED TREE
mobile/android/geckoview/api.txt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
--- a/mobile/android/geckoview/api.txt
+++ b/mobile/android/geckoview/api.txt
@@ -700,19 +700,19 @@ package org.mozilla.geckoview {
   @android.support.annotation.UiThread public class GeckoView extends android.widget.FrameLayout {
     ctor public GeckoView(android.content.Context);
     ctor public GeckoView(android.content.Context, android.util.AttributeSet);
     method public void coverUntilFirstPaint(int);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.DynamicToolbarAnimator getDynamicToolbarAnimator();
     method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.gecko.EventDispatcher getEventDispatcher();
     method @android.support.annotation.NonNull public org.mozilla.geckoview.PanZoomController getPanZoomController();
     method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession getSession();
-    method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession releaseSession();
-    method @android.support.annotation.UiThread public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
-    method @android.support.annotation.UiThread public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoRuntime);
+    method @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession releaseSession();
+    method public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
+    method public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoRuntime);
     method public boolean shouldPinOnScreen();
     field protected final org.mozilla.geckoview.GeckoView.Display mDisplay;
     field protected org.mozilla.geckoview.GeckoRuntime mRuntime;
     field protected org.mozilla.geckoview.GeckoSession mSession;
     field protected android.view.SurfaceView mSurfaceView;
   }
 
   @android.support.annotation.AnyThread public class GeckoWebExecutor {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
@@ -237,24 +237,16 @@ public class GeckoView extends FrameLayo
     }
 
     /* package */ void setActive(final boolean active) {
         if (mSession != null) {
             mSession.setActive(active);
         }
     }
 
-    /**
-     * Unsets the current session from this instance and returns it, if any. You must call
-     * this before {@link #setSession(GeckoSession)} if there is already an open session
-     * set for this instance.
-     *
-     * @return The {@link GeckoSession} that was set for this instance. May be null.
-     */
-    @UiThread
     public @Nullable GeckoSession releaseSession() {
         ThreadUtils.assertOnUiThread();
 
         if (mSession == null) {
             return null;
         }
 
         // Cover the view while we are not drawing to the surface.
@@ -282,46 +274,37 @@ public class GeckoView extends FrameLayo
         }
         mSession = null;
         mRuntime = null;
         return session;
     }
 
     /**
      * Attach a session to this view. The session should be opened before
-     * attaching. If this instance already has an open session, you must use
-     * {@link #releaseSession()} first, otherwise {@link IllegalStateException}
-     * will be thrown. This is to avoid potentially leaking the currently opened session.
+     * attaching.
      *
      * @param session The session to be attached.
-     * @throws IllegalArgumentException if an existing open session is already set.
      */
-    @UiThread
     public void setSession(@NonNull final GeckoSession session) {
         ThreadUtils.assertOnUiThread();
 
         if (!session.isOpen()) {
             throw new IllegalArgumentException("Session must be open before attaching");
         }
 
         setSession(session, session.getRuntime());
     }
 
     /**
      * Attach a session to this view. The session should be opened before
      * attaching or a runtime needs to be provided for automatic opening.
-     * If this instance already has an open session, you must use
-     * {@link #releaseSession()} first, otherwise {@link IllegalStateException}
-     * will be thrown. This is to avoid potentially leaking the currently opened session.
      *
      * @param session The session to be attached.
      * @param runtime The runtime to be used for opening the session.
-     * @throws IllegalArgumentException if an existing open session is already set.
      */
-    @UiThread
     public void setSession(@NonNull final GeckoSession session,
                            @Nullable final GeckoRuntime runtime) {
         ThreadUtils.assertOnUiThread();
 
         if (mSession != null && mSession.isOpen()) {
             throw new IllegalStateException("Current session is open");
         }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
@@ -16,18 +16,16 @@ layout: geckoview
 
 - Added methods for each setting in [`GeckoSessionSettings`][66.3]
 
 [66.3]: ../GeckoSessionSettings.html
 
 - Added GeckoRuntimeSetting for enabling desktop viewport. Desktop viewport is
   no longer set by `USER_AGENT_MODE_DESKTOP` and must be set separately.
 
-- Added `@UiThread` to `GeckoSession.releaseSession` and `GeckoSession.setSession`
-
 ## v65
 - Moved [`CompositorController`][65.1], [`DynamicToolbarAnimator`][65.2],
   [`OverscrollEdgeEffect`][65.3], [`PanZoomController`][65.4] from
   `org.mozilla.gecko.gfx` to [`org.mozilla.geckoview`][65.5]
 
 [65.1]: ../CompositorController.html
 [65.2]: ../DynamicToolbarAnimator.html
 [65.3]: ../OverscrollEdgeEffect.html