Closed
Bug 322597
Opened 19 years ago
Closed 13 years ago
using AString as outparam doesn't work when using it from javascript
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 535685
People
(Reporter: mvl, Unassigned)
Details
Attachments
(3 files)
In an .idl file, i tried to use an AString as outparam. I couldn't get it to work. It threw an NS_ERROR_FAILURE. Both the component implementation and the caller were written in javascript. When using wstring instead, it worked just like it should. steps to reproduce: 1. write an idl with |void testOutAString(out AUTF8String aStr);| 2. implement the component in javascript: function f(aStr){aStr.value="foo"; return} 3. call it: o={}; test.testOutAString(o); result: error thrown.
Reporter | ||
Comment 1•19 years ago
|
||
You need to somehow xpidl this file. I've done that by putting it in mozilla/calendar/base/public, and added it to the makefile
Reporter | ||
Comment 2•19 years ago
|
||
this is the implementation. Just put it in the components dir.
Reporter | ||
Comment 3•19 years ago
|
||
finally, the caller. Just run from xpcshell. It shouldn't throw an error, but it does.
Reporter | ||
Comment 4•19 years ago
|
||
Comment on attachment 207751 [details] testcase: the idl > void testOutAString(out AUTF8String aStr); That should have been AString, not AUTF8String. But it doesn't really matter, because the problem stays.
Updated•18 years ago
|
Assignee: dbradley → nobody
Updated•18 years ago
|
QA Contact: pschwartau → xpconnect
Comment 5•13 years ago
|
||
Fixed by bug 535685 (a one line change) in revision 420131e7219d.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•