зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460601 - Fix up Prompt.jsm Dispatcher retrieval. r=jchen
Forgotten in bug 1459298. MozReview-Commit-ID: ANOK5Mp709K --HG-- extra : rebase_source : b94b38dc9cb714256cb03ec2db8a8d58f86e324d
This commit is contained in:
Родитель
8186c1e30a
Коммит
6c6cc479c4
|
@ -182,8 +182,14 @@ Prompt.prototype = {
|
|||
},
|
||||
|
||||
_innerShow: function() {
|
||||
let dispatcher = GeckoViewUtils.getDispatcherForWindow(this.window) ||
|
||||
GeckoViewUtils.getActiveDispatcher();
|
||||
let dispatcher;
|
||||
if (this.window) {
|
||||
dispatcher = GeckoViewUtils.getDispatcherForWindow(this.window);
|
||||
}
|
||||
if (!dispatcher) {
|
||||
[dispatcher] = GeckoViewUtils.getActiveDispatcherAndWindow();
|
||||
}
|
||||
|
||||
dispatcher.sendRequestForResult(this.msg).then((data) => {
|
||||
if (this.callback) {
|
||||
this.callback(data);
|
||||
|
|
Загрузка…
Ссылка в новой задаче