Closed
Bug 1442866
Opened 8 years ago
Closed 8 years ago
TB fails on about:support with ReferenceError: reference to undefined property "policies" - TEST-UNEXPECTED-FAIL | [snip]/mozmill/content-tabs/test-about-support.js
Categories
(Firefox :: Enterprise Policies, defect)
Firefox
Enterprise Policies
Tracking
()
RESOLVED
FIXED
Firefox 60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: Paenglab, Assigned: Paenglab)
References
Details
(Whiteboard: [Thunderbird-testfailure: Z all])
Attachments
(1 file, 1 obsolete file)
|
1.27 KB,
patch
|
Felipe
:
review+
|
Details | Diff | Splinter Review |
Since bug 1426362 TB fails in about:config with:
ReferenceError: reference to undefined property "policies"[Learn More] Troubleshoot.jsm:254:5
Troubleshoot data provider failed: application
TypeError: Services.policies is undefined Troubleshoot.jsm:154
It's no wonder as this is a browser only feature. Please could you make to not fail when it's undefined or only check when it's run from FX?
And maybe think about moving the policies to toolkit? Then TB could use this too in the future
| Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(felipc)
Comment 1•8 years ago
|
||
Could we do something like:
try {
data.policiesStatus = Services.policies.status;
} catch (e) {
// Other applications like Thunderbird don't have policies.
data.policiesStatus = null;
}
Richard, could you try that and submit a patch for review.
Summary: TB fails on about:support with ReferenceError: reference to undefined property "policies" → TB fails on about:support with ReferenceError: reference to undefined property "policies" - TEST-UNEXPECTED-FAIL | [snip]/mozmill/content-tabs/test-about-support.js
Whiteboard: [Thunderbird-testfailure: Z all]
| Assignee | ||
Comment 2•8 years ago
|
||
With the try/catch I still get the ReferenceError, so I decided to use the AppConstants.
Comment 3•8 years ago
|
||
Comment on attachment 8955767 [details] [diff] [review]
policiesStatus.patch
Review of attachment 8955767 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry about that. I tried to protect against this problem in aboutSupport.js (see https://hg.mozilla.org/mozilla-central/rev/476e0758eb1c#l2.12), but I forgot about Troubleshoot.jsm.
This patch is fine, although I suggest that you try the following version:
if (Services.policies) {
data.policiesStatus = Services.policies.status;
}
No need for the else part. And then on aboutSupport.js, we could change the line that I linked above to check for data.policiesStatus instead of Services.policies.
if it doesn't throw any errors, it's probably the best approach. Otherwise, I'll take this patch
Attachment #8955767 -
Flags: review?(felipc)
Updated•8 years ago
|
Flags: needinfo?(felipc)
| Assignee | ||
Comment 4•8 years ago
|
||
(In reply to :Felipe Gomes (needinfo me!) from comment #3)
> This patch is fine, although I suggest that you try the following version:
>
> if (Services.policies) {
> data.policiesStatus = Services.policies.status;
> }
Ah, yes this is a lot simpler...and works without error.
Attachment #8955767 -
Attachment is obsolete: true
Attachment #8955803 -
Flags: review?(felipc)
Updated•8 years ago
|
Attachment #8955803 -
Flags: review?(felipc) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8577732074db
Make the policiesStatus work on TB too. r=Felipe
Keywords: checkin-needed
Comment 7•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in
before you can comment on or make changes to this bug.
Description
•