Skip to content

Commit

Permalink
Bug 1735098 - Implement EpochTimeStamp from HR-Time r=edgar
Browse files Browse the repository at this point in the history
Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also w3c/hr-time#124 and whatwg/webidl#1021

Differential Revision: https://phabricator.services.mozilla.com/D128030
  • Loading branch information
marcoscaceres committed Nov 16, 2021
1 parent cc12927 commit 04d9c2d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion dom/bindings/parser/WebIDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8668,7 +8668,6 @@ def reset(self):

# Builtin IDL defined by WebIDL
_builtins = """
typedef unsigned long long DOMTimeStamp;
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
"""

Expand Down
1 change: 1 addition & 0 deletions dom/imptests/idlharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions dom/interfaces/base/domstubs.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions dom/webidl/Performance.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 04d9c2d

Please sign in to comment.