diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /toolkit/components/uniffi-bindgen-gecko-js | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/uniffi-bindgen-gecko-js')
15 files changed, 441 insertions, 225 deletions
diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRelevancy.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRelevancy.sys.mjs index 2a4663e1cb..56dc8aab33 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRelevancy.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRelevancy.sys.mjs @@ -316,14 +316,13 @@ export class RelevancyStore { this[uniffiObjectPtr] = opts[constructUniffiObject]; } /** - * An async constructor for RelevancyStore. + * A constructor for RelevancyStore. * - * @returns {Promise<RelevancyStore>}: A promise that resolves - * to a newly constructed RelevancyStore + * @returns { RelevancyStore } */ static init(dbpath) { const liftResult = (result) => FfiConverterTypeRelevancyStore.lift(result); - const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data); + const liftError = null; const functionCall = () => { try { FfiConverterString.checkType(dbpath) @@ -333,16 +332,12 @@ export class RelevancyStore { } throw e; } - return UniFFIScaffolding.callAsync( + return UniFFIScaffolding.callSync( 1, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new FfiConverterString.lower(dbpath), ) } - try { - return functionCall().then((result) => handleRustResult(result, liftResult, liftError)); - } catch (error) { - return Promise.reject(error) - }} + return handleRustResult(functionCall(), liftResult, liftError);} calculateMetrics() { const liftResult = (result) => FfiConverterTypeInterestMetrics.lift(result); @@ -360,8 +355,20 @@ export class RelevancyStore { } } - ingest(topUrls) { + close() { const liftResult = (result) => undefined; + const liftError = null; + const functionCall = () => { + return UniFFIScaffolding.callSync( + 3, // relevancy:uniffi_relevancy_fn_method_relevancystore_close + FfiConverterTypeRelevancyStore.lower(this), + ) + } + return handleRustResult(functionCall(), liftResult, liftError); + } + + ingest(topUrls) { + const liftResult = (result) => FfiConverterTypeInterestVector.lift(result); const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data); const functionCall = () => { try { @@ -373,7 +380,7 @@ export class RelevancyStore { throw e; } return UniFFIScaffolding.callAsync( - 3, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest + 4, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest FfiConverterTypeRelevancyStore.lower(this), FfiConverterSequencestring.lower(topUrls), ) @@ -385,12 +392,24 @@ export class RelevancyStore { } } + interrupt() { + const liftResult = (result) => undefined; + const liftError = null; + const functionCall = () => { + return UniFFIScaffolding.callSync( + 5, // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt + FfiConverterTypeRelevancyStore.lower(this), + ) + } + return handleRustResult(functionCall(), liftResult, liftError); + } + userInterestVector() { const liftResult = (result) => FfiConverterTypeInterestVector.lift(result); const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 4, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector + 6, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector FfiConverterTypeRelevancyStore.lower(this), ) } @@ -527,7 +546,7 @@ export class FfiConverterTypeInterestMetrics extends FfiConverterArrayBuffer { } export class InterestVector { - constructor({ animals, arts, autos, business, career, education, fashion, finance, food, government, health, hobbies, home, news, realEstate, society, sports, tech, travel, inconclusive } = {}) { + constructor({ animals, arts, autos, business, career, education, fashion, finance, food, government, hobbies, home, news, realEstate, society, sports, tech, travel, inconclusive } = {}) { try { FfiConverterU32.checkType(animals) } catch (e) { @@ -609,14 +628,6 @@ export class InterestVector { throw e; } try { - FfiConverterU32.checkType(health) - } catch (e) { - if (e instanceof UniFFITypeError) { - e.addItemDescriptionPart("health"); - } - throw e; - } - try { FfiConverterU32.checkType(hobbies) } catch (e) { if (e instanceof UniFFITypeError) { @@ -698,7 +709,6 @@ export class InterestVector { this.finance = finance; this.food = food; this.government = government; - this.health = health; this.hobbies = hobbies; this.home = home; this.news = news; @@ -721,7 +731,6 @@ export class InterestVector { this.finance == other.finance && this.food == other.food && this.government == other.government && - this.health == other.health && this.hobbies == other.hobbies && this.home == other.home && this.news == other.news && @@ -749,7 +758,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer { finance: FfiConverterU32.read(dataStream), food: FfiConverterU32.read(dataStream), government: FfiConverterU32.read(dataStream), - health: FfiConverterU32.read(dataStream), hobbies: FfiConverterU32.read(dataStream), home: FfiConverterU32.read(dataStream), news: FfiConverterU32.read(dataStream), @@ -772,7 +780,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer { FfiConverterU32.write(dataStream, value.finance); FfiConverterU32.write(dataStream, value.food); FfiConverterU32.write(dataStream, value.government); - FfiConverterU32.write(dataStream, value.health); FfiConverterU32.write(dataStream, value.hobbies); FfiConverterU32.write(dataStream, value.home); FfiConverterU32.write(dataStream, value.news); @@ -796,7 +803,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer { totalSize += FfiConverterU32.computeSize(value.finance); totalSize += FfiConverterU32.computeSize(value.food); totalSize += FfiConverterU32.computeSize(value.government); - totalSize += FfiConverterU32.computeSize(value.health); totalSize += FfiConverterU32.computeSize(value.hobbies); totalSize += FfiConverterU32.computeSize(value.home); totalSize += FfiConverterU32.computeSize(value.news); @@ -895,14 +901,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer { throw e; } try { - FfiConverterU32.checkType(value.health); - } catch (e) { - if (e instanceof UniFFITypeError) { - e.addItemDescriptionPart(".health"); - } - throw e; - } - try { FfiConverterU32.checkType(value.hobbies); } catch (e) { if (e instanceof UniFFITypeError) { @@ -989,16 +987,15 @@ export const Interest = { FINANCE: 8, FOOD: 9, GOVERNMENT: 10, - HEALTH: 11, - HOBBIES: 12, - HOME: 13, - NEWS: 14, - REAL_ESTATE: 15, - SOCIETY: 16, - SPORTS: 17, - TECH: 18, - TRAVEL: 19, - INCONCLUSIVE: 20, + HOBBIES: 11, + HOME: 12, + NEWS: 13, + REAL_ESTATE: 14, + SOCIETY: 15, + SPORTS: 16, + TECH: 17, + TRAVEL: 18, + INCONCLUSIVE: 19, }; Object.freeze(Interest); @@ -1027,24 +1024,22 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer { case 10: return Interest.GOVERNMENT case 11: - return Interest.HEALTH - case 12: return Interest.HOBBIES - case 13: + case 12: return Interest.HOME - case 14: + case 13: return Interest.NEWS - case 15: + case 14: return Interest.REAL_ESTATE - case 16: + case 15: return Interest.SOCIETY - case 17: + case 16: return Interest.SPORTS - case 18: + case 17: return Interest.TECH - case 19: + case 18: return Interest.TRAVEL - case 20: + case 19: return Interest.INCONCLUSIVE default: throw new UniFFITypeError("Unknown Interest variant"); @@ -1092,44 +1087,40 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer { dataStream.writeInt32(10); return; } - if (value === Interest.HEALTH) { - dataStream.writeInt32(11); - return; - } if (value === Interest.HOBBIES) { - dataStream.writeInt32(12); + dataStream.writeInt32(11); return; } if (value === Interest.HOME) { - dataStream.writeInt32(13); + dataStream.writeInt32(12); return; } if (value === Interest.NEWS) { - dataStream.writeInt32(14); + dataStream.writeInt32(13); return; } if (value === Interest.REAL_ESTATE) { - dataStream.writeInt32(15); + dataStream.writeInt32(14); return; } if (value === Interest.SOCIETY) { - dataStream.writeInt32(16); + dataStream.writeInt32(15); return; } if (value === Interest.SPORTS) { - dataStream.writeInt32(17); + dataStream.writeInt32(16); return; } if (value === Interest.TECH) { - dataStream.writeInt32(18); + dataStream.writeInt32(17); return; } if (value === Interest.TRAVEL) { - dataStream.writeInt32(19); + dataStream.writeInt32(18); return; } if (value === Interest.INCONCLUSIVE) { - dataStream.writeInt32(20); + dataStream.writeInt32(19); return; } throw new UniFFITypeError("Unknown Interest variant"); @@ -1140,7 +1131,7 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer { } static checkType(value) { - if (!Number.isInteger(value) || value < 1 || value > 20) { + if (!Number.isInteger(value) || value < 1 || value > 19) { throw new UniFFITypeError(`${value} is not a valid value for Interest`); } } diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRemoteSettings.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRemoteSettings.sys.mjs index e839b6f17d..0e28486087 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRemoteSettings.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustRemoteSettings.sys.mjs @@ -356,7 +356,7 @@ export class RemoteSettings { throw e; } return UniFFIScaffolding.callSync( - 6, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new + 8, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new FfiConverterTypeRemoteSettingsConfig.lower(remoteSettingsConfig), ) } @@ -383,7 +383,7 @@ export class RemoteSettings { throw e; } return UniFFIScaffolding.callAsync( - 7, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path + 9, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path FfiConverterTypeRemoteSettings.lower(this), FfiConverterString.lower(attachmentId), FfiConverterString.lower(path), @@ -401,7 +401,7 @@ export class RemoteSettings { const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 8, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records + 10, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records FfiConverterTypeRemoteSettings.lower(this), ) } @@ -425,7 +425,7 @@ export class RemoteSettings { throw e; } return UniFFIScaffolding.callAsync( - 9, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since + 11, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since FfiConverterTypeRemoteSettings.lower(this), FfiConverterU64.lower(timestamp), ) @@ -605,7 +605,7 @@ export class FfiConverterTypeAttachment extends FfiConverterArrayBuffer { } export class RemoteSettingsConfig { - constructor({ collectionName, bucketName = null, serverUrl = null } = {}) { + constructor({ collectionName, bucketName = null, serverUrl = null, server = null } = {}) { try { FfiConverterString.checkType(collectionName) } catch (e) { @@ -630,15 +630,25 @@ export class RemoteSettingsConfig { } throw e; } + try { + FfiConverterOptionalTypeRemoteSettingsServer.checkType(server) + } catch (e) { + if (e instanceof UniFFITypeError) { + e.addItemDescriptionPart("server"); + } + throw e; + } this.collectionName = collectionName; this.bucketName = bucketName; this.serverUrl = serverUrl; + this.server = server; } equals(other) { return ( this.collectionName == other.collectionName && this.bucketName == other.bucketName && - this.serverUrl == other.serverUrl + this.serverUrl == other.serverUrl && + this.server == other.server ) } } @@ -650,12 +660,14 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe collectionName: FfiConverterString.read(dataStream), bucketName: FfiConverterOptionalstring.read(dataStream), serverUrl: FfiConverterOptionalstring.read(dataStream), + server: FfiConverterOptionalTypeRemoteSettingsServer.read(dataStream), }); } static write(dataStream, value) { FfiConverterString.write(dataStream, value.collectionName); FfiConverterOptionalstring.write(dataStream, value.bucketName); FfiConverterOptionalstring.write(dataStream, value.serverUrl); + FfiConverterOptionalTypeRemoteSettingsServer.write(dataStream, value.server); } static computeSize(value) { @@ -663,6 +675,7 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe totalSize += FfiConverterString.computeSize(value.collectionName); totalSize += FfiConverterOptionalstring.computeSize(value.bucketName); totalSize += FfiConverterOptionalstring.computeSize(value.serverUrl); + totalSize += FfiConverterOptionalTypeRemoteSettingsServer.computeSize(value.server); return totalSize } @@ -695,6 +708,14 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe } throw e; } + try { + FfiConverterOptionalTypeRemoteSettingsServer.checkType(value.server); + } catch (e) { + if (e instanceof UniFFITypeError) { + e.addItemDescriptionPart(".server"); + } + throw e; + } } } @@ -990,6 +1011,17 @@ export class AttachmentsUnsupportedError extends RemoteSettingsError { } } +export class ConfigError extends RemoteSettingsError { + + constructor(message, ...params) { + super(...params); + this.message = message; + } + toString() { + return `ConfigError: ${super.toString()}` + } +} + // Export the FFIConverter object to make external types work. export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer { static read(dataStream) { @@ -1008,6 +1040,8 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer return new ResponseError(FfiConverterString.read(dataStream)); case 7: return new AttachmentsUnsupportedError(FfiConverterString.read(dataStream)); + case 8: + return new ConfigError(FfiConverterString.read(dataStream)); default: throw new UniFFITypeError("Unknown RemoteSettingsError variant"); } @@ -1036,6 +1070,9 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer if (value instanceof AttachmentsUnsupportedError) { return totalSize; } + if (value instanceof ConfigError) { + return totalSize; + } throw new UniFFITypeError("Unknown RemoteSettingsError variant"); } static write(dataStream, value) { @@ -1067,12 +1104,115 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer dataStream.writeInt32(7); return; } + if (value instanceof ConfigError) { + dataStream.writeInt32(8); + return; + } throw new UniFFITypeError("Unknown RemoteSettingsError variant"); } static errorClass = RemoteSettingsError; } + +export class RemoteSettingsServer {} +RemoteSettingsServer.Prod = class extends RemoteSettingsServer{ + constructor( + ) { + super(); + } +} +RemoteSettingsServer.Stage = class extends RemoteSettingsServer{ + constructor( + ) { + super(); + } +} +RemoteSettingsServer.Dev = class extends RemoteSettingsServer{ + constructor( + ) { + super(); + } +} +RemoteSettingsServer.Custom = class extends RemoteSettingsServer{ + constructor( + url + ) { + super(); + this.url = url; + } +} + +// Export the FFIConverter object to make external types work. +export class FfiConverterTypeRemoteSettingsServer extends FfiConverterArrayBuffer { + static read(dataStream) { + switch (dataStream.readInt32()) { + case 1: + return new RemoteSettingsServer.Prod( + ); + case 2: + return new RemoteSettingsServer.Stage( + ); + case 3: + return new RemoteSettingsServer.Dev( + ); + case 4: + return new RemoteSettingsServer.Custom( + FfiConverterString.read(dataStream) + ); + default: + throw new UniFFITypeError("Unknown RemoteSettingsServer variant"); + } + } + + static write(dataStream, value) { + if (value instanceof RemoteSettingsServer.Prod) { + dataStream.writeInt32(1); + return; + } + if (value instanceof RemoteSettingsServer.Stage) { + dataStream.writeInt32(2); + return; + } + if (value instanceof RemoteSettingsServer.Dev) { + dataStream.writeInt32(3); + return; + } + if (value instanceof RemoteSettingsServer.Custom) { + dataStream.writeInt32(4); + FfiConverterString.write(dataStream, value.url); + return; + } + throw new UniFFITypeError("Unknown RemoteSettingsServer variant"); + } + + static computeSize(value) { + // Size of the Int indicating the variant + let totalSize = 4; + if (value instanceof RemoteSettingsServer.Prod) { + return totalSize; + } + if (value instanceof RemoteSettingsServer.Stage) { + return totalSize; + } + if (value instanceof RemoteSettingsServer.Dev) { + return totalSize; + } + if (value instanceof RemoteSettingsServer.Custom) { + totalSize += FfiConverterString.computeSize(value.url); + return totalSize; + } + throw new UniFFITypeError("Unknown RemoteSettingsServer variant"); + } + + static checkType(value) { + if (!(value instanceof RemoteSettingsServer)) { + throw new UniFFITypeError(`${value} is not a subclass instance of RemoteSettingsServer`); + } + } +} + + // Export the FFIConverter object to make external types work. export class FfiConverterOptionalstring extends FfiConverterArrayBuffer { static checkType(value) { @@ -1148,6 +1288,43 @@ export class FfiConverterOptionalTypeAttachment extends FfiConverterArrayBuffer } // Export the FFIConverter object to make external types work. +export class FfiConverterOptionalTypeRemoteSettingsServer extends FfiConverterArrayBuffer { + static checkType(value) { + if (value !== undefined && value !== null) { + FfiConverterTypeRemoteSettingsServer.checkType(value) + } + } + + static read(dataStream) { + const code = dataStream.readUint8(0); + switch (code) { + case 0: + return null + case 1: + return FfiConverterTypeRemoteSettingsServer.read(dataStream) + default: + throw UniFFIError(`Unexpected code: ${code}`); + } + } + + static write(dataStream, value) { + if (value === null || value === undefined) { + dataStream.writeUint8(0); + return; + } + dataStream.writeUint8(1); + FfiConverterTypeRemoteSettingsServer.write(dataStream, value) + } + + static computeSize(value) { + if (value === null || value === undefined) { + return 1; + } + return 1 + FfiConverterTypeRemoteSettingsServer.computeSize(value) + } +} + +// Export the FFIConverter object to make external types work. export class FfiConverterSequenceTypeRemoteSettingsRecord extends FfiConverterArrayBuffer { static read(dataStream) { const len = dataStream.readInt32(); diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs index 7ab2e2d8e2..fbc34e1c3d 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs @@ -484,7 +484,7 @@ export class SuggestStore { throw e; } return UniFFIScaffolding.callSync( - 11, // suggest:uniffi_suggest_fn_constructor_suggeststore_new + 13, // suggest:uniffi_suggest_fn_constructor_suggeststore_new FfiConverterString.lower(path), FfiConverterOptionalTypeRemoteSettingsConfig.lower(settingsConfig), ) @@ -496,7 +496,7 @@ export class SuggestStore { const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 12, // suggest:uniffi_suggest_fn_method_suggeststore_clear + 14, // suggest:uniffi_suggest_fn_method_suggeststore_clear FfiConverterTypeSuggestStore.lower(this), ) } @@ -512,7 +512,7 @@ export class SuggestStore { const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 13, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions + 15, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions FfiConverterTypeSuggestStore.lower(this), ) } @@ -536,7 +536,7 @@ export class SuggestStore { throw e; } return UniFFIScaffolding.callAsync( - 14, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion + 16, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion FfiConverterTypeSuggestStore.lower(this), FfiConverterString.lower(rawSuggestionUrl), ) @@ -553,7 +553,7 @@ export class SuggestStore { const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 15, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config + 17, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config FfiConverterTypeSuggestStore.lower(this), ) } @@ -577,7 +577,7 @@ export class SuggestStore { throw e; } return UniFFIScaffolding.callAsync( - 16, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config + 18, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestionProvider.lower(provider), ) @@ -602,7 +602,7 @@ export class SuggestStore { throw e; } return UniFFIScaffolding.callAsync( - 17, // suggest:uniffi_suggest_fn_method_suggeststore_ingest + 19, // suggest:uniffi_suggest_fn_method_suggeststore_ingest FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestIngestionConstraints.lower(constraints), ) @@ -619,7 +619,7 @@ export class SuggestStore { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callSync( - 18, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt + 20, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt FfiConverterTypeSuggestStore.lower(this), ) } @@ -639,7 +639,7 @@ export class SuggestStore { throw e; } return UniFFIScaffolding.callAsync( - 19, // suggest:uniffi_suggest_fn_method_suggeststore_query + 21, // suggest:uniffi_suggest_fn_method_suggeststore_query FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestionQuery.lower(query), ) @@ -706,7 +706,7 @@ export class SuggestStoreBuilder { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 21, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new + 23, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new ) } try { @@ -720,7 +720,7 @@ export class SuggestStoreBuilder { const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 22, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build + 24, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build FfiConverterTypeSuggestStoreBuilder.lower(this), ) } @@ -744,7 +744,7 @@ export class SuggestStoreBuilder { throw e; } return UniFFIScaffolding.callAsync( - 23, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path + 25, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterString.lower(path), ) @@ -769,7 +769,7 @@ export class SuggestStoreBuilder { throw e; } return UniFFIScaffolding.callAsync( - 24, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path + 26, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterString.lower(path), ) @@ -794,7 +794,7 @@ export class SuggestStoreBuilder { throw e; } return UniFFIScaffolding.callAsync( - 25, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config + 27, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeRemoteSettingsConfig.lower(config), ) @@ -806,6 +806,31 @@ export class SuggestStoreBuilder { } } + remoteSettingsServer(server) { + const liftResult = (result) => FfiConverterTypeSuggestStoreBuilder.lift(result); + const liftError = null; + const functionCall = () => { + try { + FfiConverterTypeRemoteSettingsServer.checkType(server) + } catch (e) { + if (e instanceof UniFFITypeError) { + e.addItemDescriptionPart("server"); + } + throw e; + } + return UniFFIScaffolding.callAsync( + 28, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server + FfiConverterTypeSuggestStoreBuilder.lower(this), + FfiConverterTypeRemoteSettingsServer.lower(server), + ) + } + try { + return functionCall().then((result) => handleRustResult(result, liftResult, liftError)); + } catch (error) { + return Promise.reject(error) + } + } + } // Export the FFIConverter object to make external types work. @@ -890,7 +915,7 @@ export class FfiConverterTypeSuggestGlobalConfig extends FfiConverterArrayBuffer } export class SuggestIngestionConstraints { - constructor({ maxSuggestions = null, providers = null } = {}) { + constructor({ maxSuggestions = null, providers = null, emptyOnly = false } = {}) { try { FfiConverterOptionalu64.checkType(maxSuggestions) } catch (e) { @@ -907,13 +932,23 @@ export class SuggestIngestionConstraints { } throw e; } + try { + FfiConverterBool.checkType(emptyOnly) + } catch (e) { + if (e instanceof UniFFITypeError) { + e.addItemDescriptionPart("emptyOnly"); + } + throw e; + } this.maxSuggestions = maxSuggestions; this.providers = providers; + this.emptyOnly = emptyOnly; } equals(other) { return ( this.maxSuggestions == other.maxSuggestions && - this.providers == other.providers + this.providers == other.providers && + this.emptyOnly == other.emptyOnly ) } } @@ -924,17 +959,20 @@ export class FfiConverterTypeSuggestIngestionConstraints extends FfiConverterArr return new SuggestIngestionConstraints({ maxSuggestions: FfiConverterOptionalu64.read(dataStream), providers: FfiConverterOptionalSequenceTypeSuggestionProvider.read(dataStream), + emptyOnly: FfiConverterBool.read(dataStream), }); } static write(dataStream, value) { FfiConverterOptionalu64.write(dataStream, value.maxSuggestions); FfiConverterOptionalSequenceTypeSuggestionProvider.write(dataStream, value.providers); + FfiConverterBool.write(dataStream, value.emptyOnly); } static computeSize(value) { let totalSize = 0; totalSize += FfiConverterOptionalu64.computeSize(value.maxSuggestions); totalSize += FfiConverterOptionalSequenceTypeSuggestionProvider.computeSize(value.providers); + totalSize += FfiConverterBool.computeSize(value.emptyOnly); return totalSize } @@ -959,6 +997,14 @@ export class FfiConverterTypeSuggestIngestionConstraints extends FfiConverterArr } throw e; } + try { + FfiConverterBool.checkType(value.emptyOnly); + } catch (e) { + if (e instanceof UniFFITypeError) { + e.addItemDescriptionPart(".emptyOnly"); + } + throw e; + } } } @@ -2078,6 +2124,14 @@ import { // Export the FFIConverter object to make external types work. export { FfiConverterTypeRemoteSettingsConfig, RemoteSettingsConfig }; +import { + FfiConverterTypeRemoteSettingsServer, + RemoteSettingsServer, +} from "resource://gre/modules/RustRemoteSettings.sys.mjs"; + +// Export the FFIConverter object to make external types work. +export { FfiConverterTypeRemoteSettingsServer, RemoteSettingsServer }; + @@ -2104,7 +2158,7 @@ export function rawSuggestionUrlMatches(rawUrl,url) { throw e; } return UniFFIScaffolding.callSync( - 26, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches + 29, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches FfiConverterString.lower(rawUrl), FfiConverterString.lower(url), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustTabs.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustTabs.sys.mjs index 4d34a46d9e..9ac003348b 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustTabs.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustTabs.sys.mjs @@ -361,7 +361,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 28, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply + 31, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -385,7 +385,7 @@ export class TabsBridgedEngine { throw e; } return UniFFIScaffolding.callAsync( - 29, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id + 32, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterString.lower(newSyncId), ) @@ -402,7 +402,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 30, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync + 33, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -426,7 +426,7 @@ export class TabsBridgedEngine { throw e; } return UniFFIScaffolding.callAsync( - 31, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync + 34, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterString.lower(clientData), ) @@ -443,7 +443,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 32, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset + 35, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -459,7 +459,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 33, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id + 36, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -483,7 +483,7 @@ export class TabsBridgedEngine { throw e; } return UniFFIScaffolding.callAsync( - 34, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync + 37, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterI64.lower(lastSync), ) @@ -516,7 +516,7 @@ export class TabsBridgedEngine { throw e; } return UniFFIScaffolding.callAsync( - 35, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded + 38, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterI64.lower(newTimestamp), FfiConverterSequenceTypeTabsGuid.lower(uploadedIds), @@ -542,7 +542,7 @@ export class TabsBridgedEngine { throw e; } return UniFFIScaffolding.callAsync( - 36, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming + 39, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterSequencestring.lower(incomingEnvelopesAsJson), ) @@ -559,7 +559,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 37, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished + 40, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -575,7 +575,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 38, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id + 41, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -591,7 +591,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 39, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started + 42, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -607,7 +607,7 @@ export class TabsBridgedEngine { const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 40, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe + 43, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe FfiConverterTypeTabsBridgedEngine.lower(this), ) } @@ -681,7 +681,7 @@ export class TabsStore { throw e; } return UniFFIScaffolding.callAsync( - 42, // tabs:uniffi_tabs_fn_constructor_tabsstore_new + 45, // tabs:uniffi_tabs_fn_constructor_tabsstore_new FfiConverterString.lower(path), ) } @@ -696,7 +696,7 @@ export class TabsStore { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 43, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine + 46, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine FfiConverterTypeTabsStore.lower(this), ) } @@ -712,7 +712,7 @@ export class TabsStore { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 44, // tabs:uniffi_tabs_fn_method_tabsstore_get_all + 47, // tabs:uniffi_tabs_fn_method_tabsstore_get_all FfiConverterTypeTabsStore.lower(this), ) } @@ -728,7 +728,7 @@ export class TabsStore { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 45, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager + 48, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager FfiConverterTypeTabsStore.lower(this), ) } @@ -752,7 +752,7 @@ export class TabsStore { throw e; } return UniFFIScaffolding.callAsync( - 46, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs + 49, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs FfiConverterTypeTabsStore.lower(this), FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/config.toml b/toolkit/components/uniffi-bindgen-gecko-js/config.toml index d8404f5142..d077a3e0ca 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/config.toml +++ b/toolkit/components/uniffi-bindgen-gecko-js/config.toml @@ -35,7 +35,11 @@ udl_file = "third_party/rust/relevancy/src/relevancy.udl" [relevancy.receiver_thread] default = "worker" -main = [] +main = [ + "RelevancyStore", + "RelevancyStore.close", + "RelevancyStore.interrupt", +] [remote_settings] crate_name = "remote_settings" @@ -49,32 +53,32 @@ main = [ [geometry] crate_name = "uniffi_geometry" -udl_file = "third_party/rust/uniffi-example-geometry/src/geometry.udl" +udl_file = "toolkit/components/uniffi-fixtures/geometry/src/geometry.udl" fixture = true [arithmetic] crate_name = "arithmetical" -udl_file = "third_party/rust/uniffi-example-arithmetic/src/arithmetic.udl" +udl_file = "toolkit/components/uniffi-fixtures/arithmetic/src/arithmetic.udl" fixture = true [rondpoint] crate_name = "uniffi_rondpoint" -udl_file = "third_party/rust/uniffi-example-rondpoint/src/rondpoint.udl" +udl_file = "toolkit/components/uniffi-fixtures/rondpoint/src/rondpoint.udl" fixture = true [sprites] crate_name = "uniffi_sprites" -udl_file = "third_party/rust/uniffi-example-sprites/src/sprites.udl" +udl_file = "toolkit/components/uniffi-fixtures/sprites/src/sprites.udl" fixture = true [todolist] crate_name = "uniffi_todolist" -udl_file = "third_party/rust/uniffi-example-todolist/src/todolist.udl" +udl_file = "toolkit/components/uniffi-fixtures/todolist/src/todolist.udl" fixture = true [fixture_refcounts] crate_name = "uniffi_fixture_refcounts" -udl_file = "toolkit/components/uniffi-fixture-refcounts/src/refcounts.udl" +udl_file = "toolkit/components/uniffi-fixtures/refcounts/src/refcounts.udl" fixture = true [fixture_refcounts.receiver_thread] @@ -96,10 +100,10 @@ default = "main" [custom_types] crate_name = "uniffi_custom_types" -udl_file = "toolkit/components/uniffi-example-custom-types/src/custom-types.udl" +udl_file = "toolkit/components/uniffi-fixtures/custom-types/src/custom-types.udl" fixture = true [external_types] crate_name = "uniffi_fixture_external_types" -udl_file = "toolkit/components/uniffi-fixture-external-types/src/external-types.udl" +udl_file = "toolkit/components/uniffi-fixtures/external-types/src/external-types.udl" fixture = true diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustArithmetic.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustArithmetic.sys.mjs index 62766a45a4..77df35b4b3 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustArithmetic.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustArithmetic.sys.mjs @@ -377,7 +377,7 @@ export function add(a,b) { throw e; } return UniFFIScaffolding.callAsync( - 47, // arithmetic:uniffi_arithmetical_fn_func_add + 50, // arithmetic:uniffi_arithmetical_fn_func_add FfiConverterU64.lower(a), FfiConverterU64.lower(b), ) @@ -411,7 +411,7 @@ export function div(dividend,divisor) { throw e; } return UniFFIScaffolding.callAsync( - 48, // arithmetic:uniffi_arithmetical_fn_func_div + 51, // arithmetic:uniffi_arithmetical_fn_func_div FfiConverterU64.lower(dividend), FfiConverterU64.lower(divisor), ) @@ -445,7 +445,7 @@ export function equal(a,b) { throw e; } return UniFFIScaffolding.callAsync( - 49, // arithmetic:uniffi_arithmetical_fn_func_equal + 52, // arithmetic:uniffi_arithmetical_fn_func_equal FfiConverterU64.lower(a), FfiConverterU64.lower(b), ) @@ -479,7 +479,7 @@ export function sub(a,b) { throw e; } return UniFFIScaffolding.callAsync( - 50, // arithmetic:uniffi_arithmetical_fn_func_sub + 53, // arithmetic:uniffi_arithmetical_fn_func_sub FfiConverterU64.lower(a), FfiConverterU64.lower(b), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustCustomTypes.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustCustomTypes.sys.mjs index 581478cc8a..57f9bfb189 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustCustomTypes.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustCustomTypes.sys.mjs @@ -455,7 +455,7 @@ export function getCustomTypesDemo(demo) { throw e; } return UniFFIScaffolding.callAsync( - 51, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo + 54, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo FfiConverterOptionalTypeCustomTypesDemo.lower(demo), ) } diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustExternalTypes.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustExternalTypes.sys.mjs index 88c9390225..95b0783226 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustExternalTypes.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustExternalTypes.sys.mjs @@ -381,7 +381,7 @@ export function gradient(value) { throw e; } return UniFFIScaffolding.callAsync( - 52, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient + 55, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient FfiConverterOptionalTypeLine.lower(value), ) } @@ -414,7 +414,7 @@ export function intersection(ln1,ln2) { throw e; } return UniFFIScaffolding.callAsync( - 53, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection + 56, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln2), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustGeometry.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustGeometry.sys.mjs index 6ff9a25fa9..891265906b 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustGeometry.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustGeometry.sys.mjs @@ -474,7 +474,7 @@ export function gradient(ln) { throw e; } return UniFFIScaffolding.callAsync( - 58, // geometry:uniffi_uniffi_geometry_fn_func_gradient + 61, // geometry:uniffi_uniffi_geometry_fn_func_gradient FfiConverterTypeLine.lower(ln), ) } @@ -507,7 +507,7 @@ export function intersection(ln1,ln2) { throw e; } return UniFFIScaffolding.callAsync( - 59, // geometry:uniffi_uniffi_geometry_fn_func_intersection + 62, // geometry:uniffi_uniffi_geometry_fn_func_intersection FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln2), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRefcounts.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRefcounts.sys.mjs index d8a598d150..88df5310ec 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRefcounts.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRefcounts.sys.mjs @@ -321,7 +321,7 @@ export class SingletonObject { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callSync( - 55, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method + 58, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method FfiConverterTypeSingletonObject.lower(this), ) } @@ -369,7 +369,7 @@ export function getJsRefcount() { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callSync( - 56, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount + 59, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount ) } return handleRustResult(functionCall(), liftResult, liftError); @@ -381,7 +381,7 @@ export function getSingleton() { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callSync( - 57, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton + 60, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton ) } return handleRustResult(functionCall(), liftResult, liftError); diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRondpoint.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRondpoint.sys.mjs index f6db36163e..b5c9a79e93 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRondpoint.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustRondpoint.sys.mjs @@ -620,7 +620,7 @@ export class Optionneur { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 61, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new + 64, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new ) } try { @@ -642,7 +642,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 62, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean + 65, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean FfiConverterTypeOptionneur.lower(this), FfiConverterBool.lower(value), ) @@ -667,7 +667,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 63, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum + 66, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum FfiConverterTypeOptionneur.lower(this), FfiConverterTypeEnumeration.lower(value), ) @@ -692,7 +692,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 64, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32 + 67, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32 FfiConverterTypeOptionneur.lower(this), FfiConverterF32.lower(value), ) @@ -717,7 +717,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 65, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64 + 68, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64 FfiConverterTypeOptionneur.lower(this), FfiConverterF64.lower(value), ) @@ -742,7 +742,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 66, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec + 69, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec FfiConverterTypeOptionneur.lower(this), FfiConverterI16.lower(value), ) @@ -767,7 +767,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 67, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex + 70, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex FfiConverterTypeOptionneur.lower(this), FfiConverterI16.lower(value), ) @@ -792,7 +792,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 68, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec + 71, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec FfiConverterTypeOptionneur.lower(this), FfiConverterI32.lower(value), ) @@ -817,7 +817,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 69, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex + 72, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex FfiConverterTypeOptionneur.lower(this), FfiConverterI32.lower(value), ) @@ -842,7 +842,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 70, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec + 73, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec FfiConverterTypeOptionneur.lower(this), FfiConverterI64.lower(value), ) @@ -867,7 +867,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 71, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex + 74, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex FfiConverterTypeOptionneur.lower(this), FfiConverterI64.lower(value), ) @@ -892,7 +892,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 72, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec + 75, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec FfiConverterTypeOptionneur.lower(this), FfiConverterI8.lower(value), ) @@ -917,7 +917,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 73, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex + 76, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex FfiConverterTypeOptionneur.lower(this), FfiConverterI8.lower(value), ) @@ -942,7 +942,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 74, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null + 77, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null FfiConverterTypeOptionneur.lower(this), FfiConverterOptionalstring.lower(value), ) @@ -967,7 +967,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 75, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence + 78, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence FfiConverterTypeOptionneur.lower(this), FfiConverterSequencestring.lower(value), ) @@ -992,7 +992,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 76, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string + 79, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string FfiConverterTypeOptionneur.lower(this), FfiConverterString.lower(value), ) @@ -1017,7 +1017,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 77, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec + 80, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec FfiConverterTypeOptionneur.lower(this), FfiConverterU16.lower(value), ) @@ -1042,7 +1042,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 78, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex + 81, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex FfiConverterTypeOptionneur.lower(this), FfiConverterU16.lower(value), ) @@ -1067,7 +1067,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 79, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec + 82, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec FfiConverterTypeOptionneur.lower(this), FfiConverterU32.lower(value), ) @@ -1092,7 +1092,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 80, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex + 83, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex FfiConverterTypeOptionneur.lower(this), FfiConverterU32.lower(value), ) @@ -1117,7 +1117,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 81, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct + 84, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct FfiConverterTypeOptionneur.lower(this), FfiConverterU32.lower(value), ) @@ -1142,7 +1142,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 82, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec + 85, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec FfiConverterTypeOptionneur.lower(this), FfiConverterU64.lower(value), ) @@ -1167,7 +1167,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 83, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex + 86, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex FfiConverterTypeOptionneur.lower(this), FfiConverterU64.lower(value), ) @@ -1192,7 +1192,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 84, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec + 87, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec FfiConverterTypeOptionneur.lower(this), FfiConverterU8.lower(value), ) @@ -1217,7 +1217,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 85, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex + 88, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex FfiConverterTypeOptionneur.lower(this), FfiConverterU8.lower(value), ) @@ -1242,7 +1242,7 @@ export class Optionneur { throw e; } return UniFFIScaffolding.callAsync( - 86, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero + 89, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero FfiConverterTypeOptionneur.lower(this), FfiConverterOptionali32.lower(value), ) @@ -1309,7 +1309,7 @@ export class Retourneur { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 88, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new + 91, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new ) } try { @@ -1331,7 +1331,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 89, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean + 92, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean FfiConverterTypeRetourneur.lower(this), FfiConverterBool.lower(value), ) @@ -1356,7 +1356,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 90, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double + 93, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double FfiConverterTypeRetourneur.lower(this), FfiConverterF64.lower(value), ) @@ -1381,7 +1381,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 91, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float + 94, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float FfiConverterTypeRetourneur.lower(this), FfiConverterF32.lower(value), ) @@ -1406,7 +1406,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 92, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16 + 95, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16 FfiConverterTypeRetourneur.lower(this), FfiConverterI16.lower(value), ) @@ -1431,7 +1431,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 93, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32 + 96, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32 FfiConverterTypeRetourneur.lower(this), FfiConverterI32.lower(value), ) @@ -1456,7 +1456,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 94, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64 + 97, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64 FfiConverterTypeRetourneur.lower(this), FfiConverterI64.lower(value), ) @@ -1481,7 +1481,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 95, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8 + 98, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8 FfiConverterTypeRetourneur.lower(this), FfiConverterI8.lower(value), ) @@ -1506,7 +1506,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 96, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres + 99, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres FfiConverterTypeRetourneur.lower(this), FfiConverterTypeDictionnaireNombres.lower(value), ) @@ -1531,7 +1531,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 97, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes + 100, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes FfiConverterTypeRetourneur.lower(this), FfiConverterTypeDictionnaireNombresSignes.lower(value), ) @@ -1556,7 +1556,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 98, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire + 101, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire FfiConverterTypeRetourneur.lower(this), FfiConverterTypeOptionneurDictionnaire.lower(value), ) @@ -1581,7 +1581,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 99, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string + 102, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string FfiConverterTypeRetourneur.lower(this), FfiConverterString.lower(value), ) @@ -1606,7 +1606,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 100, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16 + 103, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16 FfiConverterTypeRetourneur.lower(this), FfiConverterU16.lower(value), ) @@ -1631,7 +1631,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 101, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32 + 104, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32 FfiConverterTypeRetourneur.lower(this), FfiConverterU32.lower(value), ) @@ -1656,7 +1656,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 102, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64 + 105, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64 FfiConverterTypeRetourneur.lower(this), FfiConverterU64.lower(value), ) @@ -1681,7 +1681,7 @@ export class Retourneur { throw e; } return UniFFIScaffolding.callAsync( - 103, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8 + 106, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8 FfiConverterTypeRetourneur.lower(this), FfiConverterU8.lower(value), ) @@ -1748,7 +1748,7 @@ export class Stringifier { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 105, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new + 108, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new ) } try { @@ -1770,7 +1770,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 106, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean + 109, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean FfiConverterTypeStringifier.lower(this), FfiConverterBool.lower(value), ) @@ -1795,7 +1795,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 107, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double + 110, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double FfiConverterTypeStringifier.lower(this), FfiConverterF64.lower(value), ) @@ -1820,7 +1820,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 108, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float + 111, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float FfiConverterTypeStringifier.lower(this), FfiConverterF32.lower(value), ) @@ -1845,7 +1845,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 109, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16 + 112, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16 FfiConverterTypeStringifier.lower(this), FfiConverterI16.lower(value), ) @@ -1870,7 +1870,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 110, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32 + 113, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32 FfiConverterTypeStringifier.lower(this), FfiConverterI32.lower(value), ) @@ -1895,7 +1895,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 111, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64 + 114, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64 FfiConverterTypeStringifier.lower(this), FfiConverterI64.lower(value), ) @@ -1920,7 +1920,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 112, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8 + 115, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8 FfiConverterTypeStringifier.lower(this), FfiConverterI8.lower(value), ) @@ -1945,7 +1945,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 113, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16 + 116, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16 FfiConverterTypeStringifier.lower(this), FfiConverterU16.lower(value), ) @@ -1970,7 +1970,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 114, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32 + 117, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32 FfiConverterTypeStringifier.lower(this), FfiConverterU32.lower(value), ) @@ -1995,7 +1995,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 115, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64 + 118, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64 FfiConverterTypeStringifier.lower(this), FfiConverterU64.lower(value), ) @@ -2020,7 +2020,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 116, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8 + 119, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8 FfiConverterTypeStringifier.lower(this), FfiConverterU8.lower(value), ) @@ -2045,7 +2045,7 @@ export class Stringifier { throw e; } return UniFFIScaffolding.callAsync( - 117, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string + 120, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string FfiConverterTypeStringifier.lower(this), FfiConverterString.lower(value), ) @@ -3284,7 +3284,7 @@ export function copieCarte(c) { throw e; } return UniFFIScaffolding.callAsync( - 118, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte + 121, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c), ) } @@ -3309,7 +3309,7 @@ export function copieDictionnaire(d) { throw e; } return UniFFIScaffolding.callAsync( - 119, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire + 122, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire FfiConverterTypeDictionnaire.lower(d), ) } @@ -3334,7 +3334,7 @@ export function copieEnumeration(e) { throw e; } return UniFFIScaffolding.callAsync( - 120, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration + 123, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration FfiConverterTypeEnumeration.lower(e), ) } @@ -3359,7 +3359,7 @@ export function copieEnumerations(e) { throw e; } return UniFFIScaffolding.callAsync( - 121, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations + 124, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations FfiConverterSequenceTypeEnumeration.lower(e), ) } @@ -3384,7 +3384,7 @@ export function switcheroo(b) { throw e; } return UniFFIScaffolding.callAsync( - 122, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo + 125, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo FfiConverterBool.lower(b), ) } diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustSprites.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustSprites.sys.mjs index c25a488009..f95f9e6069 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustSprites.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustSprites.sys.mjs @@ -325,7 +325,7 @@ export class Sprite { throw e; } return UniFFIScaffolding.callAsync( - 124, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new + 127, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new FfiConverterOptionalTypePoint.lower(initialPosition), ) } @@ -361,7 +361,7 @@ export class Sprite { throw e; } return UniFFIScaffolding.callAsync( - 125, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to + 128, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to FfiConverterTypePoint.lower(reference), FfiConverterTypeVector.lower(direction), ) @@ -377,7 +377,7 @@ export class Sprite { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 126, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position + 129, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position FfiConverterTypeSprite.lower(this), ) } @@ -401,7 +401,7 @@ export class Sprite { throw e; } return UniFFIScaffolding.callAsync( - 127, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by + 130, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by FfiConverterTypeSprite.lower(this), FfiConverterTypeVector.lower(direction), ) @@ -426,7 +426,7 @@ export class Sprite { throw e; } return UniFFIScaffolding.callAsync( - 128, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to + 131, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to FfiConverterTypeSprite.lower(this), FfiConverterTypePoint.lower(position), ) @@ -678,7 +678,7 @@ export function translate(position,direction) { throw e; } return UniFFIScaffolding.callAsync( - 129, // sprites:uniffi_uniffi_sprites_fn_func_translate + 132, // sprites:uniffi_uniffi_sprites_fn_func_translate FfiConverterTypePoint.lower(position), FfiConverterTypeVector.lower(direction), ) diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustTodolist.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustTodolist.sys.mjs index ddeccc9bf2..945208e4cc 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustTodolist.sys.mjs +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated/RustTodolist.sys.mjs @@ -298,7 +298,7 @@ export class TodoList { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 131, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new + 134, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new ) } try { @@ -320,7 +320,7 @@ export class TodoList { throw e; } return UniFFIScaffolding.callAsync( - 132, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries + 135, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries FfiConverterTypeTodoList.lower(this), FfiConverterSequenceTypeTodoEntry.lower(entries), ) @@ -345,7 +345,7 @@ export class TodoList { throw e; } return UniFFIScaffolding.callAsync( - 133, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry + 136, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoEntry.lower(entry), ) @@ -370,7 +370,7 @@ export class TodoList { throw e; } return UniFFIScaffolding.callAsync( - 134, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item + 137, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item FfiConverterTypeTodoList.lower(this), FfiConverterString.lower(todo), ) @@ -395,7 +395,7 @@ export class TodoList { throw e; } return UniFFIScaffolding.callAsync( - 135, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items + 138, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items FfiConverterTypeTodoList.lower(this), FfiConverterSequencestring.lower(items), ) @@ -420,7 +420,7 @@ export class TodoList { throw e; } return UniFFIScaffolding.callAsync( - 136, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item + 139, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item FfiConverterTypeTodoList.lower(this), FfiConverterString.lower(todo), ) @@ -437,7 +437,7 @@ export class TodoList { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 137, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries + 140, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries FfiConverterTypeTodoList.lower(this), ) } @@ -453,7 +453,7 @@ export class TodoList { const liftError = (data) => FfiConverterTypeTodoError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 138, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first + 141, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first FfiConverterTypeTodoList.lower(this), ) } @@ -469,7 +469,7 @@ export class TodoList { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 139, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items + 142, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items FfiConverterTypeTodoList.lower(this), ) } @@ -485,7 +485,7 @@ export class TodoList { const liftError = (data) => FfiConverterTypeTodoError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 140, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last + 143, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last FfiConverterTypeTodoList.lower(this), ) } @@ -501,7 +501,7 @@ export class TodoList { const liftError = (data) => FfiConverterTypeTodoError.lift(data); const functionCall = () => { return UniFFIScaffolding.callAsync( - 141, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry + 144, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry FfiConverterTypeTodoList.lower(this), ) } @@ -517,7 +517,7 @@ export class TodoList { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 142, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default + 145, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default FfiConverterTypeTodoList.lower(this), ) } @@ -880,7 +880,7 @@ export function createEntryWith(todo) { throw e; } return UniFFIScaffolding.callAsync( - 143, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with + 146, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with FfiConverterString.lower(todo), ) } @@ -897,7 +897,7 @@ export function getDefaultList() { const liftError = null; const functionCall = () => { return UniFFIScaffolding.callAsync( - 144, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list + 147, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list ) } try { @@ -921,7 +921,7 @@ export function setDefaultList(list) { throw e; } return UniFFIScaffolding.callAsync( - 145, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list + 148, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list FfiConverterTypeTodoList.lower(list), ) } diff --git a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/xpcshell.toml b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/xpcshell.toml index 801e95382f..dff0eaa877 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/xpcshell.toml +++ b/toolkit/components/uniffi-bindgen-gecko-js/fixtures/tests/xpcshell/xpcshell.toml @@ -3,32 +3,22 @@ ["test_arithmetic.js"] # I think this can be re-enabled when we implement https://bugzilla.mozilla.org/show_bug.cgi?id=1888668 -lineno = "3" ["test_callbacks.js"] disabled = "Temporarily disabled until we can re-enable callback support" -lineno = "8" ["test_custom_types.js"] -lineno = "12" ["test_external_types.js"] -lineno = "15" ["test_geometry.js"] -lineno = "18" ["test_refcounts.js"] -lineno = "21" ["test_rondpoint.js"] -lineno = "24" ["test_sprites.js"] -lineno = "27" ["test_todolist.js"] -lineno = "30" ["test_type_checking.js"] -lineno = "33" diff --git a/toolkit/components/uniffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp b/toolkit/components/uniffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp index 83aeae8086..fef14592f9 100644 --- a/toolkit/components/uniffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp +++ b/toolkit/components/uniffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp @@ -16,7 +16,7 @@ using dom::AutoEntryScript; using dom::GlobalObject; using dom::RootedDictionary; using dom::Promise; -using dom::ScaffoldingType; +using dom::UniFFIScaffoldingValue; using dom::Sequence; using dom::UniFFICallbackHandler; using dom::UniFFIPointer; @@ -81,7 +81,7 @@ Maybe<CallbackInterfaceInfo> {{ prefix }}GetCallbackInterfaceInfo(uint64_t aInte } } -Maybe<already_AddRefed<Promise>> {{ prefix }}CallAsync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<ScaffoldingType>& aArgs, ErrorResult& aError) { +Maybe<already_AddRefed<Promise>> {{ prefix }}CallAsync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<UniFFIScaffoldingValue>& aArgs, ErrorResult& aError) { switch (aId) { {%- for (ci, config) in components %} {%- for func in ci.exposed_functions() %} @@ -95,7 +95,7 @@ Maybe<already_AddRefed<Promise>> {{ prefix }}CallAsync(const GlobalObject& aGlob return Nothing(); } -bool {{ prefix }}CallSync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<ScaffoldingType>& aArgs, RootedDictionary<UniFFIScaffoldingCallResult>& aReturnValue, ErrorResult& aError) { +bool {{ prefix }}CallSync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<UniFFIScaffoldingValue>& aArgs, RootedDictionary<UniFFIScaffoldingCallResult>& aReturnValue, ErrorResult& aError) { switch (aId) { {%- for (ci, config) in components %} {%- for func in ci.exposed_functions() %} |