Closed
Bug 328037
Opened 19 years ago
Closed 19 years ago
JS_CallFunctionName should return the same as JS_CallFunctionValue
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: mbd, Assigned: brendan)
References
Details
(Keywords: fixed1.8.0.2, fixed1.8.1, Whiteboard: [tcn-dl])
Attachments
(1 file)
|
777 bytes,
patch
|
mrbkap
:
review+
brendan
:
approval-branch-1.8.1+
dveditz
:
approval1.8.0.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) KHTML/3.2.3 (like Gecko)
Build Identifier: cvs
If you look at the source to current CVS js, here is the last lines for JS_CallFunctionName:
ok = js_InternalCall(cx, obj, fval, argc, argv, rval);
LAST_FRAME_CHECKS(cx, ok);
return JS_TRUE;
and, for JS_CallFunctionValue
ok = js_InternalCall(cx, obj, fval, argc, argv, rval);
LAST_FRAME_CHECKS(cx, ok);
return ok;
I think JS_CallFunctionName should return ok, not JS_TRUE. This is based on reading the docs. The difference is most clear, if your code throws an unhandled exception.
A work around is to call JS_GetProperty for the name, then call JS_CallFunctionValue. This will allow calls to function that throws, to return JS_FALSE.
Reproducible: Always
| Assignee | ||
Comment 1•19 years ago
|
||
Whoops -- easily fixed. Thanks for pointing this typo out.
/be
Assignee: general → brendan
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 2•19 years ago
|
||
Trivial, I'm checking in.
/be
Attachment #212684 -
Flags: review?(mrbkap)
Comment 3•19 years ago
|
||
Comment on attachment 212684 [details] [diff] [review]
fix
Yes.
Attachment #212684 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Updated•19 years ago
|
Attachment #212684 -
Flags: approval1.8.0.2?
Attachment #212684 -
Flags: approval-branch-1.8.1+
| Assignee | ||
Comment 4•19 years ago
|
||
Fixed on trunk.
/be
Blocks: js1.6rc1
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking1.8.0.2?
Resolution: --- → FIXED
Comment 5•19 years ago
|
||
Comment on attachment 212684 [details] [diff] [review]
fix
approved for 1.8.0 branch, a=dveditz
Attachment #212684 -
Flags: approval1.8.0.2? → approval1.8.0.2+
Updated•19 years ago
|
Flags: blocking1.8.0.2? → blocking1.8.0.2+
Updated•19 years ago
|
Flags: testcase-
You need to log in
before you can comment on or make changes to this bug.
Description
•