diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2023-03-01 04:23:40 +0000 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2023-03-01 04:23:40 +0000 |
commit | 38f96bd8d378f8547b1886b1490a5fd985125e2d (patch) | |
tree | 586b900018497445fe3a610f9a3ef5c6313d94fe | |
parent | 850748278c79ddac0ea7eede2045ce33ba310471 (diff) | |
parent | 8e1dc133796d4216f9ff681cd4675adfc5baa158 (diff) | |
download | gjs-38f96bd8d378f8547b1886b1490a5fd985125e2d.tar.gz |
Merge branch 'fix-gio-priorities' into 'master'
Gio: Use proper default priority on async generators
See merge request GNOME/gjs!827
-rw-r--r-- | modules/core/overrides/Gio.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/core/overrides/Gio.js b/modules/core/overrides/Gio.js index 85fcde98..f7629ea8 100644 --- a/modules/core/overrides/Gio.js +++ b/modules/core/overrides/Gio.js @@ -625,7 +625,8 @@ function _init() { } }; - Gio.InputStream.prototype.createAsyncIterator = async function* createAsyncIterator(count, ioPriority = Gio.PRIORITY_DEFAULT) { + Gio.InputStream.prototype.createAsyncIterator = async function* createAsyncIterator( + count, ioPriority = GLib.PRIORITY_DEFAULT) { const self = this; function next() { @@ -670,7 +671,7 @@ function _init() { function next() { return new Promise((resolve, reject) => { - self.next_files_async(1, Gio.PRIORITY_DEFAULT, null, (_self, res) => { + self.next_files_async(1, GLib.PRIORITY_DEFAULT, null, (_self, res) => { try { const files = self.next_files_finish(res); resolve(files.length === 0 ? null : files[0]); @@ -683,7 +684,7 @@ function _init() { function close() { return new Promise((resolve, reject) => { - self.close_async(Gio.PRIORITY_DEFAULT, null, (_self, res) => { + self.close_async(GLib.PRIORITY_DEFAULT, null, (_self, res) => { try { resolve(self.close_finish(res)); } catch (err) { |