Fix Tab.getWebContents for downstream instrumentation tests
commit9013fc8939168ed393119ce440e2630b3b68ed1c
authorjdduke <jdduke@chromium.org>
Mon, 15 Sep 2014 23:27:20 +0000 (15 16:27 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 15 Sep 2014 23:30:58 +0000 (15 23:30 +0000)
tree4d19c23a10aca643a37c4919e8b5bb07bb447921
parent8f3f93deca6710d7001415afb3b0822ad91708d1
Fix Tab.getWebContents for downstream instrumentation tests

Tab.getWebContents() was using JNI to fetch the WebContents object. This
is undesirable for several reasons, including performance impact and
thread access consistency. Remove this and prefer redirecting the query
to ContentViewcore.getWebContents() instead.

This fix is a temporary workaround until all downstream test sites can
be patched.

BUG=398263,414445
TBR=tedchoc@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#294918}
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
chrome/browser/android/tab_android.cc
chrome/browser/android/tab_android.h