Closed
Bug 560587
Opened 14 years ago
Closed 12 years ago
GeneratePropertyOp doesn't explain to the compiler that it's aware of how JS_SetReservedSlot works for JSFunction
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file, 1 obsolete file)
796 bytes,
patch
|
Details | Diff | Splinter Review |
163 GeneratePropertyOp(JSContext *cx, JSObject *obj, jsval idval, uintN argc, 168 JSFunction *fun = 169 JS_NewFunction(cx, reinterpret_cast<JSNative>(PropertyOpForwarder), 170 argc, JSFUN_FAST_NATIVE, obj, name); 174 JSObject *funobj = JS_GetFunctionObject(fun); 189 JS_SetReservedSlot(cx, funobj, 0, OBJECT_TO_JSVAL(ptrobj)); 190 JS_SetReservedSlot(cx, funobj, 1, idval);
Attachment #440273 -
Attachment is obsolete: true
Attachment #440485 -
Flags: review?(mrbkap)
Attachment #440273 -
Flags: review?(mrbkap)
Comment 3•14 years ago
|
||
timeless, can you please explain why these are needed?
doing this enables coverity (and similar tools) to recognize cases where a function isn't safely used. currently coverity warns that you aren't checking a function whose return value is usually checked.
Comment 5•12 years ago
|
||
This ended up getting fixed by bug 697537.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•12 years ago
|
Attachment #440485 -
Flags: review?(mrbkap)
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•