Closed
Bug 416229
Opened 17 years ago
Closed 17 years ago
Add support for nsINativeTypes.STRING
Categories
(Core :: js-ctypes, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: nossralf, Unassigned)
Details
Attachments
(1 file)
2.87 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4pre) Gecko/2008020604 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3pre) Gecko/2008013122 Minefield/3.0b3pre
As it stands, nsINativeTypes has a constant called STRING defined (corresponds to char* buffers) but no implementation exists for it. When declaring a library function where the return type or a parameter is nsINativeTypes.STRING no error is returned, but when the declared function is subsequently called from JavaScript, Firefox crashes due to ffi_prep_cif() receiving incomplete parameter information.
Reproducible: Always
Steps to Reproduce:
1.Open a shared library using js-ctypes.
2.Declare a function where a parameter or the return type is of type nsINativeTypes.STRING.
3.Attempt to call the declared function from JavaScript.
Actual Results:
Firefox crashes due to a segmentation fault.
Expected Results:
The function returns and Firefox doesn't segfault.
Reporter | ||
Comment 1•17 years ago
|
||
This is a patch that simply follows the logic for WSTRING and adds support for STRING in nsNativeMethod::Execute.
Comment 2•17 years ago
|
||
landed, thanks
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Product: Other Applications → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•