Closed Bug 570551 Opened 16 years ago Closed 16 years ago

Don't use shared-permanent properties to implement RegExp instance properties

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Attached patch Patch — — Splinter Review
No description provided.
Attachment #449685 - Flags: review?(jorendorff)
Comment on attachment 449685 [details] [diff] [review] Patch RegExpClass needs an enumerate hook to go with that resolve hook. The easiest way to do it would be to make that static data file-scope rather than function-scope ...which maybe isn't so bad anyway.
Attachment #449685 - Flags: review?(jorendorff)
It isn't currently the case that resolve hooks require corresponding enumerate hooks. From documentation for JSEnumerateOp: "[The hook] should define any remaining lazy properties *that should be enumerable* but are not yet defined in obj." https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSEnumerateOp (Emphasis added.) I have heard rumblings of changing this to require enumerate hooks to also add non-enumerable resolved properties, but it hasn't happened yet.
Comment on attachment 449685 [details] [diff] [review] Patch Note as prior art that fun_resolve does not have a corresponding fun_enumerate.
Attachment #449685 - Flags: review?(jorendorff)
Attachment #449685 - Flags: review?(jorendorff) → review+
Whiteboard: fixed-in-tracemonkey
Waldo is right that enumerate is thus far for enumerable props, since JSOP_IN and hasOwnProperty both resolve, so find non-enumerable lazy props /be
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: