Bug 979586 - Part 2: Add Pure/Constant extattrs to IDB interfaces when applicable r=dom-storage-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D134555
This commit is contained in:
Kagami Sascha Rosylight 2022-07-15 03:43:34 +00:00
parent 91dd83f2a6
commit 7d7b7cb561
3 changed files with 7 additions and 12 deletions

View File

@ -21,12 +21,8 @@ interface IDBCursor {
[BinaryName="getDirection"]
readonly attribute IDBCursorDirection direction;
[Throws]
readonly attribute any key;
[Throws]
readonly attribute any primaryKey;
[Pure, Throws] readonly attribute any key;
[Pure, Throws] readonly attribute any primaryKey;
[SameObject] readonly attribute IDBRequest request;
[Throws]
@ -44,6 +40,5 @@ interface IDBCursor {
[Exposed=(Window,Worker), Func="IDBFactory::IsEnabled"]
interface IDBCursorWithValue : IDBCursor {
[Throws]
readonly attribute any value;
[Pure, Throws] readonly attribute any value;
};

View File

@ -12,7 +12,7 @@
[Exposed=(Window,Worker)]
interface IDBDatabase : EventTarget {
readonly attribute DOMString name;
[Constant] readonly attribute DOMString name;
readonly attribute unsigned long long version;
readonly attribute DOMStringList objectStoreNames;

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBVersionChangeEvent
* https://w3c.github.io/IndexedDB/#idbversionchangeevent
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
@ -20,7 +20,7 @@ interface IDBVersionChangeEvent : Event {
constructor(DOMString type,
optional IDBVersionChangeEventInit eventInitDict = {});
readonly attribute unsigned long long oldVersion;
readonly attribute unsigned long long? newVersion;
[Constant] readonly attribute unsigned long long oldVersion;
[Constant] readonly attribute unsigned long long? newVersion;
};