cleanup: Remove old compatibility code
Since gjs moved to mozjs60, return values of int8_t arrays can no longer be treated as strings. We originally made the conversion conditional to keep working with the (then) stable gjs release. That was two years ago and we require a more recent gjs nowadays, so there's no good reason for keeping the old code path. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1407
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
923d926345
commit
112b139a9e
@ -2,6 +2,7 @@
|
||||
/* exported init connect disconnect */
|
||||
|
||||
const { GLib, Gio, GObject, Shell, St } = imports.gi;
|
||||
const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const ExtensionDownloader = imports.ui.extensionDownloader;
|
||||
@ -282,8 +283,7 @@ var ExtensionManager = class {
|
||||
let metadataContents, success_;
|
||||
try {
|
||||
[success_, metadataContents] = metadataFile.load_contents(null);
|
||||
if (metadataContents instanceof Uint8Array)
|
||||
metadataContents = imports.byteArray.toString(metadataContents);
|
||||
metadataContents = ByteArray.toString(metadataContents);
|
||||
} catch (e) {
|
||||
throw new Error('Failed to load metadata.json: %s'.format(e.toString()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user