c64ad5c2e063cde757eba7f9499a8e748b57cbdc |
|
09-Dec-2014 |
Mikhail Naganov <mnaganov@google.com> |
Cherry-pick: [Android] Java Bridge: handle requests from Java Script on the background thread Same as the upsteam patch, with purely syntactic adaptations of "override" keywords usage to the legacy style used in M39. Bug: 18520475 Original description: commit a4b0d4cc0b9780aecd3e23a94293b2e3002baf7e Author: mnaganov <mnaganov@chromium.org> Date: Tue Dec 09 13:30:08 2014 [Android] Java Bridge: handle requests from Java Script on the background thread This allows the page code that calls into injected objects methods to run even if the browser UI thread is blocked (in WebView, the browser UI thread is the main app thread, and sometimes people use synchronization primitives there that wait on some action performed by the injected object, see the bug for an example). In this CL, we make the minimal required amount of changes in order to simplify cherry-picking into older branches. A cleanup CL (or CLs) will follow. High-level description of changes: 1. We intercept messages from renderers on the IO thread using BrowserMessageFilter and handle Java Bridge messages entirely on the background thread. This implies the following changes: 2. GinJavaBridgeDispatcherHost has become RefCountedThreadSafe (via BrowserMessageFilter) 3. We have to use route IDs of RenderFrameHosts instead of pointers to them, as we can't access RFHs from IO or background threads. 4. Objects registry is now accessed from UI and background threads, and we have to use locking. We can't anymore restrict access to the registry to a single thread. This also means we can't anymore implement the registry using IDMap, as it is explicitly non-thread-safe. 5. A lot of code was removed, as we now serve synchronous requests from renderers without inter-thread hopping! 6. Of course, a new regression test has been added that now passes. BUG=438255 Review URL: https://codereview.chromium.org/772123002 Change-Id: I9e517024878f0b95a32f95524de4f8017ba8dc21 Cr-Commit-Position: refs/heads/master@{#307460}
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
64a92734073d2aa3acb7fc4b0dc6ab78963012fc |
|
03-Dec-2014 |
Mikhail Naganov <mnaganov@google.com> |
Update the code dealing with scoped_ptrs and scoped_refptrs in JavaBridge Required for the main patch fixing b/18520475. These changes are purely in the syntax -- retrieve the underlying raw pointer directly, instead of relying on overridden operators. This is to match the current code in M40 and trunk. Bug: 18520475
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
83eff5096b2d7faaad5ebabc0a49f34aeb850acd |
|
02-Dec-2014 |
Mikhail Naganov <mnaganov@google.com> |
Cherry-pick: [Android] Fix a subtle issue in Java Bridge regarding interfaces removal Required for the main patch fixing b/18520475. Bug: 18520475 Original description: commit 4d4182c4af0a11a1ad5acae88f9abe2b76853fe1 Author: mnaganov <mnaganov@chromium.org> Date: Mon Dec 01 11:59:14 2014 [Android] Fix a subtle issue in Java Bridge regarding interfaces removal Update JavaBridgeBasicsTest.testRemovalNotReflectedUntilReload to actually call Java GC after removing the interface, and verify that the Java object is still callable from the page side. Fix the code to make the test pass. BUG=437761 Review URL: https://codereview.chromium.org/767453003 Cr-Commit-Position: refs/heads/master@{#306176} Change-Id: If12d53e3aad721e5822d8e12c85f1240e1aac5e6
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
1320f92c476a1ad9d19dba2a48c72b75566198e9 |
|
30-Sep-2014 |
Primiano Tucci <primiano@google.com> |
Merge from Chromium at DEPS revision 267aeeb8d85c This commit was generated by merge_to_master.py. Change-Id: Id3aac9713b301fae64408cdaee0888724eeb7c0e
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
6e8cce623b6e4fe0c9e4af605d675dd9d0338c38 |
|
19-Aug-2014 |
Torne (Richard Coles) <torne@google.com> |
Merge from Chromium at DEPS revision 290040 This commit was generated by merge_to_master.py. Change-Id: I694ec52d1e0b553f163c2faf4373d63270ab1aac
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
116680a4aac90f2aa7413d9095a592090648e557 |
|
21-Jul-2014 |
Ben Murdoch <benm@google.com> |
Merge from Chromium at DEPS revision 284076 This commit was generated by merge_to_master.py. Change-Id: I9a279485b02fe7ceddcd32d992a714ff132e99ae
/external/chromium_org/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|