Closed Bug 1160656 Opened 9 years ago Closed 9 years ago

updating the video dimensions cache on one view should not change caches on other views

Categories

(Hello (Loop) :: Client, defect, P2)

defect
Points:
3

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Iteration:
41.1 - May 25
Tracking Status
firefox41 --- fixed

People

(Reporter: dmosedale, Assigned: dmosedale)

References

Details

(Whiteboard: [faster])

Attachments

(1 file)

Found this while noticing that the views in some ui-showcase iframes were interfering with views in others.  After a bunch of hunting, I learned about a corner of JS that I hadn't found myself in before: if you put a non-simple object onto the prototype, and then assign _inside_ that object from a concrete object derived from the prototype, the assignment changes the prototype, not the derived object.  Good times!

In other words, updating the video dimensions cache on one StandaloneRoomView was changing them on all the others, which was making the ui-showcase unworkable.
Comment on attachment 8600480 [details] [diff] [review]
Separate MediaSetupMixin caches on different instances more completel

Review of attachment 8600480 [details] [diff] [review]:
-----------------------------------------------------------------

Excellent! Thanks for this!

::: browser/components/loop/test/shared/mixins_test.js
@@ +406,5 @@
>              .eql(0.32857142857142857);
>          });
> +
> +        it("should not populate the cache on another component instance",
> +          function() {

nit: I think it's good to not be constrained by strictly following the 80 chars rule, but take a more flexible and modern approach of 80-120 chars and apply line-breaks in that range in service of readability.

I have two vertical guides set in my editor; one on 80ch and another on 120ch.
Attachment #8600480 - Flags: review?(mdeboer) → review+
Rank: 20
Flags: firefox-backlog+
Priority: -- → P2
Whiteboard: [faster]
Iteration: --- → 41.1 - May 25
https://hg.mozilla.org/mozilla-central/rev/2eeddac30370
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: