Closed
Bug 1442923
Opened 7 years ago
Closed 7 years ago
'aCallBack is not a function' at viewSourceUtils.js:268 when using view_source.editor.external
Categories
(Toolkit :: View Source, defect, P2)
Toolkit
View Source
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox58 | --- | unaffected |
firefox59 | --- | unaffected |
firefox60 | --- | fixed |
People
(Reporter: aceman, Assigned: jryans)
References
Details
(Keywords: regression)
Attachments
(2 files)
When the pref view_source.editor.external is set to true to use an external editor for View Source, I get this error in the console:
TypeError: aCallBack is not a function 1 viewSourceUtils.js:268:5
handleCallBack chrome://global/content/viewSourceUtils.js:268:5
onContentLoaded chrome://global/content/viewSourceUtils.js:387:9
onStateChange chrome://global/content/viewSourceUtils.js:321:11
I think it is because at viewSourceUtils.js:48 the function is called without any callback so aCallback is null inside openInExternalEditor:
if (Services.prefs.getBoolPref("view_source.editor.external")) {
this.openInExternalEditor(aArgs);
So either check and do not call aCallBack if it is null, or provide it from the caller.
The comment above openInExternalEditor says the callback is a required argument.
Flags: needinfo?(jryans)
Summary: external editor → 'aCallBack is not a function' at viewSourceUtils.js:268 when using view_source.editor.external
Assignee | ||
Comment 2•7 years ago
|
||
Thanks for the report! Looks like a regression of bug 1418403.
Blocks: 1418403
status-firefox58:
--- → unaffected
status-firefox59:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Flags: needinfo?(jryans)
Keywords: regression
Assignee | ||
Comment 3•7 years ago
|
||
Additional notes for testing... Firefox UI doesn't call `viewSource` directly, but DevTools does. One example for testing:
1. Open the Computed tab in the Inspector
2. Enable Browser Styles
3. Expand some property backed by a UA sheet, like `unicode-bidi` on `body`
4. Click the sheet link
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Priority: -- → P2
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8956137 [details]
Bug 1442923 - Convert openInExtenalEditor to Promises.
https://reviewboard.mozilla.org/r/225066/#review231044
Attachment #8956137 -
Flags: review?(bdahl) → review+
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8956136 [details]
Bug 1442923 - Remove expired View Source telemetry.
https://reviewboard.mozilla.org/r/225064/#review231046
Attachment #8956136 -
Flags: review?(bdahl) → review+
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4efff8fdc216
Remove expired View Source telemetry. r=bdahl
https://hg.mozilla.org/integration/autoland/rev/4bd1219880f9
Convert openInExtenalEditor to Promises. r=bdahl
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4efff8fdc216
https://hg.mozilla.org/mozilla-central/rev/4bd1219880f9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•