Fix crash when showing multiple popups.
commit52516a4c58a6ec6a88452601e2efea6e2f75704a
authortedchoc <tedchoc@chromium.org>
Thu, 25 Sep 2014 23:24:40 +0000 (25 16:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 25 Sep 2014 23:26:48 +0000 (25 23:26 +0000)
treea2464a0e18a4afddd4f9bf67c348148708c1f4ef
parent5da932e693169900a4a4be346446788aa1944eeb
Fix crash when showing multiple popups.

The problem is that calling hide/cancel on a popup is async.

With two popups, you would get

Previously:
SHOW A
HIDE A
SHOW B
NOTIFY SELECTION A
HIDE B
NOTIFY SELECTION B

When notifying the selection of A in the above scenario, it was
clearing the frame pointer (and actually updating the wrong popup).
Then when hiding the second popup, it's reference was actually gone
already.

Fix this by making the call to hide sync instead of async.

BUG=416354

Review URL: https://codereview.chromium.org/603303002

Cr-Commit-Position: refs/heads/master@{#296826}
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java