If you're not in an IRC channel with mrgiggles, and happen to
have a Firefox or xpcshell instance, you can also just evaluate
`Components.Exception("", 0x80630001)`, which will generally
work with anything other than NSS error codes (which are
special, and have their own special lookup mechanism).
On Fri, Mar 29, 2019 at 04:41:53PM -0700, Steve Fink wrote:
If you're in an IRC channel with mrgiggles, the query "what is
0x806e000b?" will return the corresponding nsresult code(s), together
with any associated comments heuristically parsed from the
ErrorList.py source. The comments are sometimes helpful:
<sfink> what is 0x804B0046?
<mrgiggles> 0x804b0046 as nsresult is NS_ERROR_DOCUMENT_NOT_CACHED
from the NETWORK module, commented:
Error passed through onStopRequest if the document could not be
fetched from the cache.
and sometimes not so much:
<sfink> what is 0x80630001?
<mrgiggles> 0x80630001 as nsresult is NS_ERROR_STORAGE_BUSY from the
"STORAGE" module, commented:
To add additional errors to Storage, please append entries to the
bottom of the list in the following format:
NS_ERROR_STORAGE_YOUR_ERR, FAILURE(n)
where n is the next unique positive integer. You must also add an
entry to js/xpconnect/src/xpc.msg under the code block beginning with
the comment 'storage related codes (from mozStorage.h)', in the
following format: 'XPC_MSG_DEF(NS_ERROR_STORAGE_YOUR_ERR, "brief
description of your error")'
If mrgiggles does not subscribe to your favored channel, or you're the
quiet unassuming sort, `/msg mrgiggles what is 0x80630001?` anywhere
on moznet will also work.
Reverse lookup also works:
<sfink> what is NS_RDF_ASSERTION_REJECTED?
<mrgiggles> NS_RDF_ASSERTION_REJECTED is 0x4f0003 from the RDF module,
commented as:
Returned from nsIRDFDataSource::Assert() and Unassert() if the
assertion not willing to record the statement.
I'm not entirely sure why that last one is a success code rather than
an error code, but thankfully I do not need to know. mrgiggles will
update every couple of hours or so, except when I break it and don't
notice.
Web-based nsresult lookup services include Mossop's
https://www.oxymoronical.com/nsresult/ and the older
https://james-ross.co.uk/mozilla/misc/nserror
Note that this output is only for numbers that happen to be nsresult
codes; mrgiggles has other numeric lookup tricks too:
<sfink> what is 0xfffe6b887ea990a0?
<mrgiggles> sfink: (as PUNBOX64) ObjectValue(0x6b887ea990a0)
<sfink> what is 0xe5e5e5f7?
<mrgiggles> e5e5e5f7 is 18 bytes after the magic value e5e5e5e5
0xe5 is jemalloc freed memory
if you're seeing a crash with this pattern, you may have a
use-after-free on your hands
and you'd better fix it. They tend to be security bugs! (Or we
might just have not initialized that memory after allocating it.)
I don't normally post about new mrgiggles tricks, but the nsresult
stuff seems generally useful and undiscoverable.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
--
Kris Maglione
Senior Firefox Add-ons Engineer
Mozilla Corporation
It is the mark of an educated mind to be able to entertain a thought
without accepting it.
--Aristotle
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform