Closed Bug 710996 Opened 13 years ago Closed 13 years ago

Possible double-assignment in JS_GetValidFrameCalleeObject()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: Dolske, Assigned: felix)

References

Details

(Whiteboard: [pvs-studio])

Attachments

(1 file)

From http://www.viva64.com/en/a/0078/,
20th section in http://www.viva64.com/external-pictures/txt/mozilla-test.txt

V519 The '* vp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 711, 712.
jsdbgapi.cpp 712

JS_PUBLIC_API(JSBool)
JS_GetValidFrameCalleeObject(JSContext *cx, JSStackFrame *fp, jsval *vp)
{
    Value v;

    if (!Valueify(fp)->getValidCalleeObject(cx, &v))
        return false;
    *vp = v.isObject() ? v : JSVAL_VOID;
    *vp = v;
    return true;
}
Blocks: 710966
Assignee: general → ffung
Status: NEW → ASSIGNED
Attachment #581905 - Flags: review?(jorendorff)
Comment on attachment 581905 [details] [diff] [review]
Double-assignment in JS_GetValidFrameCalleeObject()

Review of attachment 581905 [details] [diff] [review]:
-----------------------------------------------------------------

This one looks like an actual bug.
Attachment #581905 - Flags: review?(jorendorff) → review+
https://hg.mozilla.org/mozilla-central/rev/6388d336d451
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: