Closed
Bug 58191
Opened 24 years ago
Closed 24 years ago
Wstring passed from C++ to Java with extra garbage symbols
Categories
(Core Graveyard :: Java to XPCOM Bridge, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: avm, Assigned: blackconnect)
Details
If XPCOM component has some method with "out" parameter wstring, (for eg. void TestWString(out wstring i);) And somebody tried to call this method from Java, then extra garbage symbols will be passed to Java. For example if in native code you put "Some test string" then in Java code you may got "Some test string?w0w0.." Suggested reason: In bcJavaMarshalToolkit::UnMarshalElement "size of buffer" used to construct new jstring, but really "size of buffer" = length * sizeof(PRUnichar) + 2 So we should use length = ("size of buffer" - 2)/sizeof(PRUnichar) to construct jstring via env->NewString method.
Assignee | ||
Comment 1•24 years ago
|
||
fixed integrated into the trunc
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•