зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1761370 - Add [Throws] annotation for `read` and `write` in FileSystemSyncAccessHandle; r=dom-storage-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D156685
This commit is contained in:
Родитель
c2a85f403d
Коммит
3e800c6b30
|
@ -35,13 +35,15 @@ JSObject* FileSystemSyncAccessHandle::WrapObject(
|
|||
|
||||
uint64_t FileSystemSyncAccessHandle::Read(
|
||||
const MaybeSharedArrayBufferViewOrMaybeSharedArrayBuffer& aBuffer,
|
||||
const FileSystemReadWriteOptions& aOptions) {
|
||||
const FileSystemReadWriteOptions& aOptions, ErrorResult& aRv) {
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t FileSystemSyncAccessHandle::Write(
|
||||
const MaybeSharedArrayBufferViewOrMaybeSharedArrayBuffer& aBuffer,
|
||||
const FileSystemReadWriteOptions& aOptions) {
|
||||
const FileSystemReadWriteOptions& aOptions, ErrorResult& aRv) {
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@ class FileSystemSyncAccessHandle final : public nsISupports,
|
|||
// WebIDL Interface
|
||||
uint64_t Read(
|
||||
const MaybeSharedArrayBufferViewOrMaybeSharedArrayBuffer& aBuffer,
|
||||
const FileSystemReadWriteOptions& aOptions);
|
||||
const FileSystemReadWriteOptions& aOptions, ErrorResult& aRv);
|
||||
|
||||
uint64_t Write(
|
||||
const MaybeSharedArrayBufferViewOrMaybeSharedArrayBuffer& aBuffer,
|
||||
const FileSystemReadWriteOptions& aOptions);
|
||||
const FileSystemReadWriteOptions& aOptions, ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Promise> Truncate(uint64_t aSize, ErrorResult& aError);
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ dictionary FileSystemReadWriteOptions {
|
|||
[Exposed=(DedicatedWorker), SecureContext, Pref="dom.fs.enabled"]
|
||||
interface FileSystemSyncAccessHandle {
|
||||
// TODO: Use `[AllowShared] BufferSource data` once it works (bug 1696216)
|
||||
unsigned long long read(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
|
||||
unsigned long long write(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
|
||||
[Throws] unsigned long long read(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
|
||||
[Throws] unsigned long long write(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
|
||||
|
||||
[NewObject]
|
||||
Promise<void> truncate([EnforceRange] unsigned long long size);
|
||||
|
|
Загрузка…
Ссылка в новой задаче