Commit 2608379e authored by Alex Ilin's avatar Alex Ilin Committed by Commit Bot

Revert "android: Add LifetimeAssert to WindowAndroid"

This reverts commit 9d2c67b2.

Reason for revert: the assertion fails in many tests on Android L
First failed builds:
- Lollipop Phone Tester (https://ci.chromium.org/p/chromium/builders/ci/Lollipop%20Phone%20Tester/25458)
- Lollipop Tablet Tester (https://ci.chromium.org/p/chromium/builders/ci/Lollipop%20Tablet%20Tester/14622)

Original change's description:
> android: Add LifetimeAssert to WindowAndroid
> 
> Bug: 1081250
> Change-Id: Id0924545fbdb1eb28ae3c8fe015559fd3e9c53d1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2191785
> Commit-Queue: Bo <boliu@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#771220}

TBR=boliu@chromium.org,agrieve@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1081250
Change-Id: I5721ca7286cdae4a462b83fb90aed393afca7d45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213537Reviewed-by: default avatarAlex Ilin <alexilin@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771789}
parent 941d8c0d
......@@ -34,7 +34,6 @@ import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.BuildInfo;
import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.LifetimeAssert;
import org.chromium.base.Log;
import org.chromium.base.ObserverList;
import org.chromium.base.PackageManagerUtils;
......@@ -69,8 +68,6 @@ public class WindowAndroid implements AndroidPermissionDelegate, DisplayAndroidO
// exactly match the target rate.
private static final float MAX_REFRESH_RATE_DELTA = 2.f;
private final LifetimeAssert mLifetimeAssert;
private KeyboardVisibilityDelegate mKeyboardVisibilityDelegate =
KeyboardVisibilityDelegate.getInstance();
......@@ -207,7 +204,6 @@ public class WindowAndroid implements AndroidPermissionDelegate, DisplayAndroidO
*/
@SuppressLint("UseSparseArrays")
protected WindowAndroid(Context context, DisplayAndroid display) {
mLifetimeAssert = LifetimeAssert.create(this);
// context does not have the same lifetime guarantees as an application context so we can't
// hold a strong reference to it.
mContextRef = new ImmutableWeakReference<>(context);
......@@ -632,7 +628,6 @@ public class WindowAndroid implements AndroidPermissionDelegate, DisplayAndroidO
* Destroys the c++ WindowAndroid object if one has been created.
*/
public void destroy() {
LifetimeAssert.setSafeToGc(mLifetimeAssert, true);
if (mNativeWindowAndroid != 0) {
// Native code clears |mNativeWindowAndroid|.
WindowAndroidJni.get().destroy(mNativeWindowAndroid, WindowAndroid.this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment