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)

defect

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
Thanks for the report! Looks like a regression of bug 1418403.
Blocks: 1418403
Flags: needinfo?(jryans)
Keywords: regression
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: nobody → jryans
Status: NEW → ASSIGNED
Priority: -- → P2
Attachment #8956137 - Flags: review?(bdahl) → review+
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: