diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2023-02-28 18:01:31 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2023-02-28 18:01:31 +0100 |
commit | 8e1dc133796d4216f9ff681cd4675adfc5baa158 (patch) | |
tree | 51259390682da98e0f4c03c4fb3a9a5da8bf5360 /modules | |
parent | 6a18579ea02add0fdd84eaa116e786376d5c2e2f (diff) | |
download | gjs-8e1dc133796d4216f9ff681cd4675adfc5baa158.tar.gz |
Gio: Use proper default priority on async generators
Gio.DEFAULT_PRIORITY is undefined given that's exposed by GLib instead.
Diffstat (limited to 'modules')
-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) { |