"browser is undefined" error when view_source.editor.external is set
Categories
(Toolkit :: View Source, defect)
Tracking
()
People
(Reporter: corax.2.6, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
Set view_source.editor.external to true and view_source.editor.path to a valid path (/usr/bin/gvim).
Actual results:
The internal editor still opens when clicking on a file in the Error Console. Additionally, the following error is logged:
browser is undefined 2 viewSourceUtils.js:251
openInExternalEditor chrome://global/content/viewSourceUtils.js:251
openInExternalEditor chrome://global/content/viewSourceUtils.js:191
viewSource chrome://messenger/content/mailCore.js:43
viewSource resource://devtools/client/webconsole/webconsole.js:198
onViewSource resource://devtools/client/webconsole/webconsole-wrapper.js:128
selectFrame resource://devtools/client/shared/components/SmartTrace.js:255
onMouseDown resource://devtools/client/debugger/src/components/SecondaryPanes/Frames/Frame.js:107
onMouseDown resource://devtools/client/debugger/src/components/SecondaryPanes/Frames/Frame.js:146
invokeGuardedCallback resource://devtools/client/shared/vendor/react-dom.js:77
invokeGuardedCallback resource://devtools/client/shared/vendor/react-dom.js:107
invokeGuardedCallbackAndCatchFirstError resource://devtools/client/shared/vendor/react-dom.js:121
executeDispatch resource://devtools/client/shared/vendor/react-dom.js:399
executeDispatchesInOrder resource://devtools/client/shared/vendor/react-dom.js:418
executeDispatchesAndRelease resource://devtools/client/shared/vendor/react-dom.js:516
executeDispatchesAndReleaseTopLevel resource://devtools/client/shared/vendor/react-dom.js:527
forEachAccumulated resource://devtools/client/shared/vendor/react-dom.js:497
runEventsInBatch resource://devtools/client/shared/vendor/react-dom.js:658
runExtractedEventsInBatch resource://devtools/client/shared/vendor/react-dom.js:667
handleTopLevel resource://devtools/client/shared/vendor/react-dom.js:4262
batchedUpdates$1 resource://devtools/client/shared/vendor/react-dom.js:13458
batchedUpdates resource://devtools/client/shared/vendor/react-dom.js:2022
dispatchEvent resource://devtools/client/shared/vendor/react-dom.js:4341
interactiveUpdates$1 resource://devtools/client/shared/vendor/react-dom.js:13513
interactiveUpdates resource://devtools/client/shared/vendor/react-dom.js:2041
dispatchInteractiveEvent resource://devtools/client/shared/vendor/react-dom.js:4318
dispatchInteractiveEvent self-hosted:1047
Looking at openInExternalEditor, it is clear that the browser argument is accessed at l.269 whether it is defined or not: https://dxr.mozilla.org/mozilla-central/source/toolkit/components/viewsource/content/viewSourceUtils.js#269
Expected results:
The external editor should have opened instead.
Comment 1•6 years ago
|
||
Reporter,
Do you see this also when using version 78?
| Reporter | ||
Comment 2•5 years ago
|
||
Yes this is still present on TB 78, with a very similar stack trace.
Updated•3 months ago
|
Comment 3•3 months ago
|
||
The severity field is not set for this bug.
:nchevobbe, could you have a look please?
For more information, please visit BugBot documentation.
Comment 4•3 months ago
|
||
Okay I tried this (updating DevTools code so it would always go through gViewSourceUtils, and for me it does work fine
This is probably a duplicate of Bug 1995674 where we fixed an issue with a similar error message
Description
•