Skip to content
Snippets Groups Projects
user avatar
Alexandre Poirot authored
This method could early return for all primitive types as they already are "debuggee values".
Then, when we have non primitives, getGlobalForObject should work
and reliably return the value's global.
The global is needed as Debugger.Object's makeDebuggeeValue only works
for objects of the same global.

There is just this edgecase around object coming from globals which
are flagged as "invisible to debugger".
We might want to return a special debuggee value instead of trying
to instantiate this special Debugger.Object which mostly throws...

I've also updated and added meaningful comments to clarify all this code.

Differential Revision: https://phabricator.services.mozilla.com/D174040
5be4d4d4
History
An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.