Closed Bug 862197 Opened 11 years ago Closed 11 years ago

ttlview.js pref observer's use of bind() makes no sense

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: etienne)

References

Details

Attachments

(1 file)

The code is:

78 SettingsListener.observe('debug.ttl.enabled', false, function(value) {
79   !!value ? TTLView.show().bind(TTLView) : TTLView.hide().bind(TTLView);
80 });

but both TTLView.show and TTLView.hide return undefined, so this just throws when called, after doing the show or hide.

This is causing test failures for me once I make us actually report the exception correctly instead of silently disappearing it into the ether, since then marionette sees the exception and does it's usual "panic, abort" thing.

For what it's worth, I can't figure out what those bind() calls are trying to accomplish, exactly...
Flags: needinfo?(alive)
Attached patch Patch proposal (deleted) — Splinter Review
Looks like a change done while debugging that slipped through.
Assignee: nobody → etienne
Attachment #737954 - Flags: review?(alive)
Attachment #737954 - Flags: review?(alive) → review+
https://github.com/mozilla-b2g/gaia/commit/86bf941140bbbd8769ba9045329e47213948870e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Thanks for the quick turnaround on this!

Do I need to file a separate bug to get the emulator the infrastructure uses updated with this, or is there a planned update in the not too far future?
Flags: needinfo?(alive) → needinfo?(jgriffin)
Yes, we need another bug for the emulator update.  I'll take care of it.
Flags: needinfo?(jgriffin)
Thanks!
Blocks: 862627
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: