Bug 1735098 - Implement EpochTimeStamp from HR-Time r=edgar

Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also https://github.com/w3c/hr-time/pull/124 and https://github.com/whatwg/webidl/pull/1021

Differential Revision: https://phabricator.services.mozilla.com/D128030
This commit is contained in:
Marcos Cáceres 2021-11-16 05:01:49 +00:00
Родитель cc12927f82
Коммит 04d9c2def4
4 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -8668,7 +8668,6 @@ class Parser(Tokenizer):
# Builtin IDL defined by WebIDL
_builtins = """
typedef unsigned long long DOMTimeStamp;
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
"""

Просмотреть файл

@ -416,6 +416,7 @@ IdlArray.prototype.assert_type_is = function(value, type)
return;
case "unsigned long long":
case "EpochTimeStamp":
case "DOMTimeStamp":
assert_equals(typeof value, "number");
assert_true(0 <= value, "unsigned long long is negative");

Просмотреть файл

@ -11,7 +11,9 @@ class nsWrapperCache;
[ptr] native nsWrapperCachePtr(nsWrapperCache);
// DOMTimeStamp is deprecated, use EpochTimeStamp instead.
typedef unsigned long long DOMTimeStamp;
typedef unsigned long long EpochTimeStamp;
typedef double DOMHighResTimeStamp;
typedef unsigned long long nsViewID;

Просмотреть файл

@ -14,6 +14,9 @@
* W3C liability, trademark and document use rules apply.
*/
// DOMTimeStamp is deprecated, use EpochTimeStamp instead.
typedef unsigned long long DOMTimeStamp;
typedef unsigned long long EpochTimeStamp;
typedef double DOMHighResTimeStamp;
typedef sequence <PerformanceEntry> PerformanceEntryList;