Closed
Bug 1228721
Opened 9 years ago
Closed 9 years ago
vtt.jsm - navigator is not defined
Categories
(Core :: Audio/Video: Playback, defect, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: jruderman, Assigned: rillian)
References
Details
(Keywords: regression, testcase)
Attachments
(3 files)
458 bytes,
text/html
|
Details | |
1.39 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
1.34 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
JavaScript error: resource://gre/modules/vtt.jsm, line 729: ReferenceError: navigator is not defined https://hg.mozilla.org/mozilla-central/rev/e715a8fc69e6 pulled in two instances of: var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); I guess |navigator| doesn't exist in the context where the code is running.
Assignee | ||
Comment 1•9 years ago
|
||
Hmm. I guess we can patch this out. Is there a more general way to leave the test but avoid the error? Something like, var isIE8 = (navigator != undefined) && (/MSIE\s8\.0/).test(navigator.userAgent);
Reporter | ||
Comment 2•9 years ago
|
||
Try this as the first sub-expression: (typeof navigator !== 'undefined') Using 'typeof' lets you avoid errors or warnings when it doesn't exist in scope.
Assignee | ||
Updated•9 years ago
|
Priority: -- → P2
Assignee | ||
Comment 3•9 years ago
|
||
Good point. Jesse, do you feel qualified to review the patch over at https://github.com/mozilla/vtt.js/pull/347 ?
Assignee: nobody → giles
Flags: needinfo?(jruderman)
Reporter | ||
Comment 4•9 years ago
|
||
It looks good to me, but I'd feel weird commenting with r+ on a project I didn't know existed until 2 minutes ago.
Flags: needinfo?(jruderman)
Assignee | ||
Comment 5•9 years ago
|
||
Ok, I'll find someone else. Rick isn't around much anymore, and none of the media peers are js experts.
Reporter | ||
Comment 6•9 years ago
|
||
If you're a peer, I suppose you could say I "wrote" the patch and you "reviewed" it.
Assignee | ||
Comment 7•9 years ago
|
||
This is slightly dodgy, using the gecko-navigator branch of https://github.com/rillian/vtt.js. I don't want to use upstream master because of the issues with the code from bug 1167492. This shouldn't cause any problems updating to the next release once those changes are sorted out, however.
Attachment #8694404 -
Flags: review?(kinetik)
Updated•9 years ago
|
Attachment #8694404 -
Flags: review?(kinetik) → review+
Comment 9•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6a6f51dd501d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Reporter | ||
Comment 10•9 years ago
|
||
Please also fix the other instance in vtt.js.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 11•9 years ago
|
||
Oops. There's another navigator access in BoxPosition().
Attachment #8695351 -
Flags: review?(kinetik)
Updated•9 years ago
|
Attachment #8695351 -
Flags: review?(kinetik) → review+
Comment 13•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/56507104b00b
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•