Blank page when jumping to function created in console
Loirooriol opened this issue · comments
- Open web console
- Enter
(function(){})
- Click "Jump to definition"
Result:
- Blank page opens
- Browser console shows this error:
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.loadURI] viewSource-content.js:331
I guess the url is "debugger eval code"
and you should blacklist that and hide the button. https://searchfox.org/mozilla-central/search?q="debugger+eval+code"
Introduced in #640, https://bugzilla.mozilla.org/show_bug.cgi?id=1419479
Cc @nchevobbe
Thanks for filing @Loirooriol .
Seems like we had this case covered in the old console https://searchfox.org/mozilla-central/source/devtools/client/webconsole/console-output.js#112-113 .
While you are at it, in the old console Function.prototype
was especially problematic (bug 1297466) because bizarrely it must be an interpreted function. It behaves well in the new console, but please add a test if there is none.
There is a test, not specifically for Function.prototype
, but for function grip with a null
url, which is the case of Function.prototype
.