Closed
Bug 315357
Opened 19 years ago
Closed 13 years ago
gfxIImageFrame should use correct IDL notations for its XPCOM violations
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dbaron, Assigned: pavlov)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
From email:
=====
On Thursday 2005-10-13 22:53 -0500, Boris Zbarsky wrote:
> 1) The designer of the gfxIImageFrame interface and of its implementation
> decided that following XPCOM rules for his methods was too much of a drag.
> So calling getImageData() from JS will crash or at least lead to reading of
> random memory by the image code after you've deallocated data it thinks it
> owns. From C++ make sure to not delete the return value of getImageData()
> and you ought to be OK.
Is there a bug on this? They should at least be marked [noscript], if
not [shared] or whatever.
=====
We should put correct IDL notations on this interface so that it either can't be used from script or (better) script could understand the strange things it does.
Assignee | ||
Comment 1•19 years ago
|
||
Yes, following the XPCOM rules there is a drag as it means copying huge amounts of data every time it is called. It should probably be marked as [shared].
Assignee | ||
Comment 2•19 years ago
|
||
Assignee | ||
Comment 3•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #202112 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #202112 -
Attachment is patch: false
Comment 4•18 years ago
|
||
You want that annotation on the out param, not on the method.
Comment 5•17 years ago
|
||
Hmm, this appears to be not so simple... void getImageData([shared, array, size_is(length)] out PRUint8 bits, out unsigned long length); results in: mozilla/gfx/idl/gfxIImageFrame.idl:132: Error: [shared] parameter "bits" cannot be of array type
Updated•15 years ago
|
QA Contact: imagelib
Comment 6•13 years ago
|
||
This IDL ultimately got replaced with imgIContainer. Most functions in there are now marked [noscript] (no direct equivalent now).
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•