[Android] Delete local java reference every loop.
commitc2a6ac32a8bc47a3a8161a4b917993b99f138303
authorkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sun, 27 Apr 2014 00:18:09 +0000 (27 00:18 +0000)
committerkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sun, 27 Apr 2014 00:18:09 +0000 (27 00:18 +0000)
treed4d044e4bb2acd5bb2fbf6149097132835190db2
parent5870f2160651fc803a22826f215adf95d410cfc1
[Android] Delete local java reference every loop.

In ForeignSessionHelper class, there were two places
we allocate ScopedJavaLocalRef<jstring> inside a loop and
doesn't delete. The Java local references are cleaned upon
returning to Java, but there is 512 local reference hard-limit
so we should delete it every loop to avoid hitting the limit.

BUG=366659

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266398 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/android/foreign_session_helper.cc