[aw] Unregister delegates from AwContents.destroy()
commit90bdfe3249589f571fd8cdb7159fb1c678052233
authorigsolla <igsolla@chromium.org>
Fri, 26 Sep 2014 18:01:45 +0000 (26 11:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Sep 2014 18:01:57 +0000 (26 18:01 +0000)
tree494c7d672043c841397e5a60c916dc10b3936b31
parent387da6233ff1ce872e183c13f361890d5c9002cb
[aw] Unregister delegates from AwContents.destroy()

AwContents are deleted asynchronously, so to stop receiving
callbacks we unregister delegates / observers / listeners
from AwContents.destroy() and ContentViewCore.destroy().
Receiving callbacks after AwContents.destroy() is called is
problematic because Java refs have already been set to null.

BUG=415666

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

Cr-Commit-Position: refs/heads/master@{#296977}
android_webview/java/src/org/chromium/android_webview/AwContents.java
android_webview/native/aw_contents.cc
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java