Closed Bug 697322 Opened 8 years ago Closed 8 years ago
Add easier to use reset method to Call
All users of InvokeArgsGuard that use calleeHasBeenReset use it before setting a new callee/this, frequently in a loop. We should make it easier to use by combining the reset with the setup of the required parameters for the new call.
Comment on attachment 569562 [details] [diff] [review] v1: Implements setupNewCall and removes calleeHasBeenReset >- ag.calleeHasBeenReset(); >- ag.calleev() = ca->fval; >- ag.thisv() = UndefinedValue(); >+ ag.setupNewCall(ca->fval, UndefinedValue()); It makes sense to merge setting callee and clearing the debug flag, but I'd rather not set both this and callee since you now need to know the order of callee/this to read the call. How about: >- ag.calleeHasBeenReset(); >- ag.calleev() = ca->fval; >+ ag.setCallee(ca->fval) > ag.thisv() = UndefinedValue(); ?
You are right. I got a bit over zealous in merging both of those.
Comment on attachment 569814 [details] [diff] [review] v2: With review feedback. Great
Attachment #569814 - Flags: review?(luke) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.