Closed Bug 1128742 Opened 10 years ago Closed 10 years ago

Prevent MSE content from being stored in bfcache

Categories

(Core :: Audio/Video, defect, P1)

33 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox35 --- unaffected
firefox36 --- affected
firefox37 --- affected
firefox38 --- affected

People

(Reporter: cajbir, Assigned: cajbir)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

To reduce MSE memory usage we won't store MSE data when the document is in bfcache and will reload the page when it's brought back.
Blocks: MSE
Priority: -- → P1
Enumerates HTMLMediaElements in page looking for those that contain a MediaSource object. If it has one the page should not be put in bfcache by returning false from CanSavePresentation.
Assignee: nobody → cajbir.bugzilla
Status: NEW → ASSIGNED
Attachment #8558218 - Flags: review?(roc)
Comment on attachment 8558218 [details] [diff] [review] Prevent pages with MSE content from going into bfcache Review of attachment 8558218 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsDocument.cpp @@ +4576,5 @@ > + MOZ_ASSERT(content, "aSupports is not a content"); > + HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(content.get()); > + bool* contains = static_cast<bool*>(aContainsMSE); > + nsRefPtr<MediaSource> ms = mediaElem->GetMozMediaSourceObject(); > + if (ms.get()) { if (ms) {
Attachment #8558218 - Flags: review?(roc) → review+
Crashed on Try: https://tbpl.mozilla.org/php/getParsedLog.php?id=58069831&tree=Try&full=1 Adding NULL pointer check for mLoadingSrc in HTMLMediaElement::GetMozMediaSourceObject. New try push: https://tbpl.mozilla.org/?tree=Try&rev=0f1f87b54745
Per IRC, we don't think this will help YouTube, because it has unload listeners.
(In reply to Ralph Giles (:rillian) from comment #5) > Per IRC, we don't think this will help YouTube, because it has unload > listeners. Yes, we'll land but no need to uplift to beta.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: