Open
Bug 226403
Opened 22 years ago
Updated 3 years ago
Wrong data type in getAsInt8 nsIVariant interface
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
REOPENED
People
(Reporter: phnixwxz1, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier:
In interface nsIVariant:
PRUint8 getAsInt8();
PRUint8 should be PRInt8.
Also in interface nsIWritableVariant.getAsInt8.
Reproducible: Always
Steps to Reproduce:
Reporter | ||
Comment 1•22 years ago
|
||
I noticed the workaround of this bug in
js/src/xpconnect/tests/components/xpctest_variant.cpp. I wonder whether PRUint8
in nsIVariant.setAsInt8 is with intent.
Updated•22 years ago
|
Summary: Wrong data type in getAsInt8 nsIVarient inteface → Wrong data type in getAsInt8 nsIVarient interface
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment 4•3 years ago
|
||
Nika noticed this issue again recently.
This is also kind of an issue because ConvertToInt8 is implemented as though it was int8, so I guess there's some undefined behavior here:
NUMERIC_CONVERSION_METHOD_NORMAL(VTYPE_INT8, uint8_t, Int8, (-127 - 1), 127)
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: EXPIRED → ---
Summary: Wrong data type in getAsInt8 nsIVarient interface → Wrong data type in getAsInt8 nsIVariant interface
Updated•3 years ago
|
Assignee: doug.turner → nobody
Updated•3 years ago
|
Severity: normal → S3
Priority: -- → P3
Updated•3 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Comment 6•3 years ago
|
||
Do we even need this? No one use this method.
Comment 7•3 years ago
|
||
Yeah, I think there's a decent argument for getting rid of int8, unint8, int16, uint16, char and wchar options from the interface.
Comment 8•3 years ago
|
||
I filed bug 1753476 about removing things from nsIVariant.
You need to log in
before you can comment on or make changes to this bug.
Description
•