Commit 4b2b4e10 authored by David Trainor's avatar David Trainor Committed by Commit Bot

Disable debugging exception for release

Turn off the IllegalStateException that gets thrown and return early.
This doesn't harm anything, but just makes it harder to track down the
cause.  Will reinstitute logging in the near future.

BUG=786916

Change-Id: I761a588121ad032555e44eafae083dcff469558c
Reviewed-on: https://chromium-review.googlesource.com/920044Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537079}
parent 25cb4934
...@@ -9,7 +9,6 @@ import android.support.v4.view.ViewCompat; ...@@ -9,7 +9,6 @@ import android.support.v4.view.ViewCompat;
import android.view.View; import android.view.View;
import android.widget.PopupWindow.OnDismissListener; import android.widget.PopupWindow.OnDismissListener;
import org.chromium.base.Log;
import org.chromium.chrome.browser.infobar.InfoBarContainer.InfoBarContainerObserver; import org.chromium.chrome.browser.infobar.InfoBarContainer.InfoBarContainerObserver;
import org.chromium.chrome.browser.infobar.InfoBarContainerLayout.Item; import org.chromium.chrome.browser.infobar.InfoBarContainerLayout.Item;
import org.chromium.chrome.browser.widget.textbubble.TextBubble; import org.chromium.chrome.browser.widget.textbubble.TextBubble;
...@@ -23,8 +22,6 @@ import org.chromium.components.feature_engagement.FeatureConstants; ...@@ -23,8 +22,6 @@ import org.chromium.components.feature_engagement.FeatureConstants;
*/ */
class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAnimationListener, class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAnimationListener,
InfoBarContainerObserver { InfoBarContainerObserver {
private static final String TAG = "IPHInfoBar";
/** Helper class to hold all relevant display parameters for an in-product help window. */ /** Helper class to hold all relevant display parameters for an in-product help window. */
public static class TrackerParameters { public static class TrackerParameters {
public TrackerParameters( public TrackerParameters(
...@@ -91,9 +88,6 @@ class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAn ...@@ -91,9 +88,6 @@ class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAn
/** The state of the currently showing in-product window or {@code null} if none is showing. */ /** The state of the currently showing in-product window or {@code null} if none is showing. */
private PopupState mCurrentState; private PopupState mCurrentState;
/** Helper for tracking invalid calls to {@link #onDismiss()}. See crbug.com/786916. */
private Throwable mLastDismissStack;
/** Creates a new instance of an IPHInfoBarSupport class. */ /** Creates a new instance of an IPHInfoBarSupport class. */
IPHInfoBarSupport(IPHBubbleDelegate delegate) { IPHInfoBarSupport(IPHBubbleDelegate delegate) {
mDelegate = delegate; mDelegate = delegate;
...@@ -155,14 +149,7 @@ class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAn ...@@ -155,14 +149,7 @@ class IPHInfoBarSupport implements OnDismissListener, InfoBarContainer.InfoBarAn
// PopupWindow.OnDismissListener implementation. // PopupWindow.OnDismissListener implementation.
@Override @Override
public void onDismiss() { public void onDismiss() {
// Helper for crbug.com/786916 to catch why we are getting two dismiss calls in a row. if (mCurrentState == null) return;
if (mCurrentState == null) {
Log.e(TAG, "Unexpected call to onDismiss. Last stack:", mLastDismissStack);
throw new IllegalStateException("Second call to onDismiss(), no current state found.");
}
mLastDismissStack = new Exception();
assert mCurrentState != null;
mDelegate.onPopupDismissed(mCurrentState); mDelegate.onPopupDismissed(mCurrentState);
mCurrentState = null; mCurrentState = null;
} }
......
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