Closed Bug 730676 Opened 13 years ago Closed 13 years ago

Add CallArgs::hasDefined convenience method

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(1 file)

Attached patch v1Splinter Review
Assignee: general → jorendorff
Attachment #600771 - Flags: review?(luke)
Comment on attachment 600771 [details] [diff] [review] v1 Review of attachment 600771 [details] [diff] [review]: ----------------------------------------------------------------- Great ::: js/src/builtin/RegExp.cpp @@ +344,5 @@ > * See ECMAv5 15.10.3.1. > */ > + if (args.length() >= 1 && > + IsObjectWithClass(args[0], ESClass_RegExp, cx) && > + !args.hasDefined(1)) How about args.hasDefined(0) && IsObjectWithClass(args[0], ESClass_RegExp, cx) && !args.hasDefined(1) ? (Unnecessary 'undefined' test, but I think this shouldn't be significant here.) ::: js/src/jsobj.cpp @@ +2400,3 @@ > if (!obj) > + return false; > + args.rval().setObject(*obj); /* Root and prepare for eventual return. */ Pre-existing, but args.rval() should only be assigned to after the last observable operation.
Attachment #600771 - Flags: review?(luke) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: