firefox-devtools / devtools-core

:rocket: Packages for Firefox DevTools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blank page when jumping to function created in console

Loirooriol opened this issue · comments

  1. Open web console
  2. Enter (function(){})
  3. 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

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.