[webvr] WebVR content continues to run after navigating away from content.

RESOLVED FIXED in Firefox 54

Status

()

Core
DOM
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: Casey Yee, Assigned: kip)

Tracking

unspecified
mozilla54
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 fixed)

Details

(Whiteboard: [webvr])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Firefox should automatically exitPresent unless traversing links.

To reproduce this:
1. navigate to https://threejs.org/examples/webvr_cubes.html
2. click Enter VR
3. navigate to another page.

See that content continues to render into the headset even after navigating away.

This also causes issues when reloading content.  Performance in headset and mirrored drops by half.  I suspect that this is due to the existing scene (pre-refresh) to continue to run.
(Reporter)

Updated

a year ago
Flags: needinfo?(kgilbert)
Component: General → DOM
Product: Firefox → Core
(Assignee)

Updated

a year ago
See Also: → bug 1299285
(Assignee)

Comment 1

a year ago
Taking this bug...  It appears to be cycle-collection / garbage collection related.
Assignee: nobody → kgilbert
Flags: needinfo?(kgilbert)
Does VR not explicitly close itself when the page goes to bfcache or so?
I don't see anything WebVR related in http://searchfox.org/mozilla-central/rev/8144fcc62054e278fe5db9666815cc13188c96fa/dom/base/nsDocument.cpp#8318

The example page here seems to enter bfcache. (pagehide event's .persisted is true)
(Assignee)

Updated

a year ago
Blocks: 1303895
(Assignee)

Comment 3

a year ago
(In reply to Olli Pettay [:smaug] from comment #2)
> Does VR not explicitly close itself when the page goes to bfcache or so?
> I don't see anything WebVR related in
> http://searchfox.org/mozilla-central/rev/
> 8144fcc62054e278fe5db9666815cc13188c96fa/dom/base/nsDocument.cpp#8318
> 
> The example page here seems to enter bfcache. (pagehide event's .persisted
> is true)

Thanks for pointing me to this function.  It seems that pages that are presenting VR content should return false in this function.  I'll give it a try and see if it fixes the issue.
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
Attachment #8833565 - Flags: review?(bugs)
(Assignee)

Comment 5

a year ago
(In reply to :kip (Kearwood Gilbert) from comment #3)
> (In reply to Olli Pettay [:smaug] from comment #2)
> > Does VR not explicitly close itself when the page goes to bfcache or so?
> > I don't see anything WebVR related in
> > http://searchfox.org/mozilla-central/rev/
> > 8144fcc62054e278fe5db9666815cc13188c96fa/dom/base/nsDocument.cpp#8318
> > 
> > The example page here seems to enter bfcache. (pagehide event's .persisted
> > is true)
> 
> Thanks for pointing me to this function.  It seems that pages that are
> presenting VR content should return false in this function.  I'll give it a
> try and see if it fixes the issue.

The attached patch seems to correct the issue, by preventing active WebVR pages from entering the bfcache.

I noticed in the try run that I see some test failures, possibly intermittent:

112 INFO TEST-UNEXPECTED-FAIL | dom/security/test/contentverifier/browser_verify_content_about_newtab2.js | Valid remote newtab page must have built-in CSP. - Got {}, expected {"csp-policies":[{"report-only":false,"script-src":["https://example.com","'unsafe-inline'"],"style-src":["https://example.com"]}]}

113 INFO TEST-UNEXPECTED-FAIL | dom/security/test/contentverifier/browser_verify_content_about_newtab2.js | Expect the following value in the result
Just a fully good testpage for Bug 1226928

I have reproduced them locally both with and without my patch applied, so I believe they are not related to the patch.

If you are too busy to review this, please advise and I'll find another.  Thanks again for the tip on bfcache!

Comment 6

a year ago
mozreview-review
Comment on attachment 8833565 [details]
Bug 1325428 - Disable bfcache for WebVR pages

https://reviewboard.mozilla.org/r/109788/#review111302
Attachment #8833565 - Flags: review?(bugs) → review+

Comment 7

a year ago
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ce29dfac81b
Disable bfcache for WebVR pages r=smaug
(Assignee)

Updated

a year ago
Blocks: 1299285

Comment 8

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6ce29dfac81b
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.