Skip to content

Commit

Permalink
Bug 1636509 - Add ProbablyShortLivingWrapper annotation to short livi…
Browse files Browse the repository at this point in the history
…ng WebXR objects r=kip,daoshengmu,webidl,smaug

WebXR has a lot of short living objects. The ProbablyShortLivingWrapper should help a bit to improve the GC performance of those objects.

Differential Revision: https://phabricator.services.mozilla.com/D74423
  • Loading branch information
MortimerGoro committed May 13, 2020
1 parent 04919ab commit b35d807
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dom/webidl/WebXR.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ interface XRRenderState {

callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame);

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRFrame {
[SameObject] readonly attribute XRSession session;

Expand Down Expand Up @@ -129,7 +129,7 @@ enum XREye {
"right"
};

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRView {
readonly attribute XREye eye;
[Throws]
Expand All @@ -138,15 +138,15 @@ interface XRView {
readonly attribute XRRigidTransform transform;
};

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRViewport {
readonly attribute long x;
readonly attribute long y;
readonly attribute long width;
readonly attribute long height;
};

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRRigidTransform {
[Throws]
constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {});
Expand All @@ -157,13 +157,13 @@ interface XRRigidTransform {
[SameObject] readonly attribute XRRigidTransform inverse;
};

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRPose {
[SameObject] readonly attribute XRRigidTransform transform;
readonly attribute boolean emulatedPosition;
};

[Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
[ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
interface XRViewerPose : XRPose {
// TODO: Use FrozenArray once available. (Bug 1236777)
[Constant, Cached, Frozen]
Expand Down

0 comments on commit b35d807

Please sign in to comment.