mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 06:45:42 +00:00
Bug 1334728 - 1. Add missing argument to dispatch call in HelperApps.jsm; r=sebastian
Add the missing "type" argument to the EventDispatcher.instance.dispatch call.
This commit is contained in:
parent
62e0b641a7
commit
f45b77cea8
@ -148,12 +148,15 @@ var HelperApps = {
|
||||
};
|
||||
|
||||
if (!callback) {
|
||||
let data = [];
|
||||
let data = null;
|
||||
// Use dispatch to enable synchronous callback for Gecko thread event.
|
||||
EventDispatcher.instance.dispatch(msg, {
|
||||
EventDispatcher.instance.dispatch(msg.type, msg, {
|
||||
onSuccess: (result) => { data = result; },
|
||||
onError: () => { throw new Error("Intent:GetHandler callback failed"); },
|
||||
});
|
||||
if (data === null) {
|
||||
throw new Error("Intent:GetHandler did not return data");
|
||||
}
|
||||
return parseData(data);
|
||||
} else {
|
||||
EventDispatcher.instance.sendRequestForResult(msg).then(function(data) {
|
||||
|
Loading…
Reference in New Issue
Block a user