Closed Bug 1333590 Opened 8 years ago Closed 8 years ago

Remove legacy messaging code

Categories

(GeckoView :: General, defect)

defect
Not set
normal

Tracking

(firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(7 files)

No description provided.
Convert places where we use GeckoRequest (to get a callback from JS to Java) to bundle events that use the built-in callback support.
Attachment #8831172 - Flags: review?(s.kaspari)
Convert the "SearchEngine:*" observers to events that go through GlobalEventDispatcher.
Attachment #8831173 - Flags: review?(s.kaspari)
Convert calls in several places where we still use Messaging.* instead of EventDispatcher.
Attachment #8831174 - Flags: review?(s.kaspari)
Convert the remaining events used in Robocop to bundle events.
Attachment #8831175 - Flags: review?(gbrown)
Add support for byte, short, float, long, and char types as the response object for event callbacks.
Attachment #8831176 - Flags: review?(snorp)
Remove GeckoEventListener and NativeEventListener now that we uniformly use BundleEventListener. Also remove related classes NativeJSContainer, NativeJSObject, and GeckoRequest, as well as related tests and C++ code. The "Messaging" object in Messaging.jsm is replaced with a dummy object that redirect calls to the global and/or window event dispatcher.
Attachment #8831177 - Flags: review?(snorp)
Add more callback tests to testEventDispatcher, 1) Test for checking that the callback for a Gecko thread event, dispatched from Gecko, is synchronous. We depend on this behavior in several places where we require a "function call" style event. 2) Test for checking that callbacks accept a variety of data types as the response object, including the standard types supported by GeckoBundle, as well as primitive types that are convertible to standard types.
Attachment #8831178 - Flags: review?(snorp)
Attachment #8831174 - Attachment description: 3. Change remaining Messaging calls to EventDispatcher calls (v3) → 3. Change remaining Messaging calls to EventDispatcher calls (v1)
Comment on attachment 8831175 [details] [diff] [review] 4. Convert remaining Robocop events to bundle events (v1) Review of attachment 8831175 [details] [diff] [review]: ----------------------------------------------------------------- This all looks fine. Be sure to push a try run with a few retries of all the robocop tests.
Attachment #8831175 - Flags: review?(gbrown) → review+
Comment on attachment 8831172 [details] [diff] [review] 1. Convert GeckoRequest usages to events (v1) Review of attachment 8831172 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/javaaddons/JavaAddonManagerV1.java @@ +190,5 @@ > + try { > + final JSONObject wrapper = new JSONObject(); > + wrapper.put("response", response); > + bundle = GeckoBundle.fromJSONObject(wrapper); > + } catch (final Exception e) { Isn't catching JSONException enough here?
Attachment #8831172 - Flags: review?(s.kaspari) → review+
Attachment #8831173 - Flags: review?(s.kaspari) → review+
Attachment #8831174 - Flags: review?(s.kaspari) → review+
Comment on attachment 8831177 [details] [diff] [review] 6. Remove GeckoEventListener and NativeEventListener (v1) Should ask you to review the Java bits (In reply to Sebastian Kaspari (:sebastian) from comment #9) > Comment on attachment 8831172 [details] [diff] [review] > 1. Convert GeckoRequest usages to events (v1) > > > + } catch (final Exception e) { > > Isn't catching JSONException enough here? Right
Attachment #8831177 - Flags: review?(s.kaspari)
Attachment #8831177 - Flags: review?(s.kaspari) → review+
Attachment #8831176 - Flags: review?(snorp) → review+
Attachment #8831177 - Flags: review?(snorp) → review+
Attachment #8831178 - Flags: review?(snorp) → review+
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ecb3d75e77db 1. Convert GeckoRequest usages to events; r=sebastian https://hg.mozilla.org/integration/mozilla-inbound/rev/05e9876c741a 2. Convert SearchEngine observers to events; r=sebastian https://hg.mozilla.org/integration/mozilla-inbound/rev/975d08403d3f 3. Change remaining Messaging calls to EventDispatcher calls; r=sebastian https://hg.mozilla.org/integration/mozilla-inbound/rev/b398ba5f0379 4. Convert remaining Robocop events to bundle events; r=gbrown https://hg.mozilla.org/integration/mozilla-inbound/rev/a196509ee1cb 5. Support other primitive types in event callback; r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/291ae1815d36 6. Remove GeckoEventListener and NativeEventListener; r=snorp r=sebastian https://hg.mozilla.org/integration/mozilla-inbound/rev/595ec77d1498 7. Add more callback tests to testEventDispatcher; r=snorp
Depends on: 1340960
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 54 → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: