Closed Bug 871177 Opened 12 years ago Closed 12 years ago

Fix the rooting hazard in IsNotDateOrRegExp

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: ehsan.akhgari, Assigned: bzbarsky)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached patch Patch (v1) (obsolete) — Splinter Review
No description provided.
Attachment #748461 - Flags: review?(tschneidereit)
The fact that this is a hazard is really unfortunate, actually: this function can be reasonably hot... Can we make this take a handle, by any chance?
(In reply to comment #1) > The fact that this is a hazard is really unfortunate, actually: this function > can be reasonably hot... > > Can we make this take a handle, by any chance? I can do that, but I have no idea whether that would fix the hazard, since I don't know how to run the hazard detection script locally.
Attachment #748461 - Flags: review?(tschneidereit) → review+
Comment on attachment 748461 [details] [diff] [review] Patch (v1) Till, please see comment 1? Please let me know if I can do something better.
Attachment #748461 - Flags: review+ → review?(tschneidereit)
Comment on attachment 748461 [details] [diff] [review] Patch (v1) Review of attachment 748461 [details] [diff] [review]: ----------------------------------------------------------------- > Till, please see comment 1? Please let me know if I can do something better. I was wondering about that but thought that there was a good reason for not turning it into a handle. Doing that will definitely fix the hazard: a handle is sort of a lent root. If you fix(ed) the rooting hazards in all callees, changing the signature to take a HandleObject (or JS::Handle<JSObject>, if HandleObject isn't available outside the js engine) should just work.
Attachment #748461 - Flags: review?(tschneidereit)
IsConvertibleToDictionary accepts a JS::Value, and passes the result of toObject() on that argument to its other override which calls IsNotDateOrRegExp. How do I correctly root that kind of thing?
Flags: needinfo?(tschneidereit)
Attached patch WIPSplinter Review
So I came up with this and then gave up since this triggers compiler errors in the Web IDL generated bindings, and I don't know enough about the codegen to fix them. Hopefully somebody else can take this.
Attachment #748461 - Attachment is obsolete: true
I'll give this a shot on Monday.
(In reply to comment #7) > I'll give this a shot on Monday. Thanks!
Assignee: nobody → bzbarsky
Comment on attachment 749660 [details] [diff] [review] Fix rooting hazard in IsNotDateOrRegexp. -w is indeed a lot easier to review
Attachment #749660 - Flags: review?(bugs) → review+
Flags: needinfo?(tschneidereit) → in-testsuite-
Target Milestone: --- → mozilla24
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: