forked from mirrors/gecko-dev
This reverts commit e542e8826b92f70dbabaf577d80a32273c684d1b. In hindsight, this was a pretty bad change. It introduces a third place where the EventDispatcher can be shutdown (JavaScript) and doesn't do a good job at communicating this across all consumers. I introduced this change in Bug 1567341 to fix some leaks in xpcshell tests at xpcom shutdown, and it was never meant to affect a normal browser use (turns out, it does). I ran the tests again in try and they are still green when reverting this change, I suspect that the actual failures I was seeing were due to a separate leak that I fixed while developing the patches. Differential Revision: https://phabricator.services.mozilla.com/D112637
58 lines
1.8 KiB
Text
58 lines
1.8 KiB
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface mozIDOMWindowProxy;
|
|
|
|
[scriptable, uuid(e64c39b8-b8ec-477d-aef5-89d517ff9219)]
|
|
interface nsIAndroidEventCallback : nsISupports
|
|
{
|
|
[implicit_jscontext]
|
|
void onSuccess([optional] in jsval data);
|
|
[implicit_jscontext]
|
|
void onError([optional] in jsval data);
|
|
};
|
|
|
|
[scriptable, function, uuid(819ee2db-d3b8-46dd-a476-40f89c49133c)]
|
|
interface nsIAndroidEventFinalizer : nsISupports
|
|
{
|
|
void onFinalize();
|
|
};
|
|
|
|
[scriptable, function, uuid(73569a75-78eb-4c7f-82b9-2d4f5ccf44c3)]
|
|
interface nsIAndroidEventListener : nsISupports
|
|
{
|
|
void onEvent(in AString event,
|
|
[optional] in jsval data,
|
|
[optional] in nsIAndroidEventCallback callback);
|
|
};
|
|
|
|
[scriptable, uuid(e98bf792-4145-411e-b298-8219d9b03817)]
|
|
interface nsIAndroidEventDispatcher : nsISupports
|
|
{
|
|
[implicit_jscontext]
|
|
void dispatch(in jsval event,
|
|
[optional] in jsval data,
|
|
[optional] in nsIAndroidEventCallback callback,
|
|
[optional] in nsIAndroidEventFinalizer finalizer);
|
|
[implicit_jscontext]
|
|
void registerListener(in nsIAndroidEventListener listener,
|
|
in jsval events);
|
|
[implicit_jscontext]
|
|
void unregisterListener(in nsIAndroidEventListener listener,
|
|
in jsval events);
|
|
};
|
|
|
|
[scriptable, uuid(60a78a94-6117-432f-9d49-304913a931c5)]
|
|
interface nsIAndroidView : nsIAndroidEventDispatcher
|
|
{
|
|
[implicit_jscontext] readonly attribute jsval initData;
|
|
};
|
|
|
|
[scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)]
|
|
interface nsIAndroidBridge : nsIAndroidEventDispatcher
|
|
{
|
|
nsIAndroidEventDispatcher getDispatcherByName(in string name);
|
|
};
|