Closed
Bug 871177
Opened 12 years ago
Closed 12 years ago
Fix the rooting hazard in IsNotDateOrRegExp
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: ehsan.akhgari, Assigned: bzbarsky)
References
Details
Attachments
(3 files, 1 obsolete file)
4.53 KB,
patch
|
Details | Diff | Splinter Review | |
10.49 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
9.26 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Attachment #748461 -
Flags: review?(tschneidereit)
Assignee | ||
Comment 1•12 years ago
|
||
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?
Reporter | ||
Comment 2•12 years ago
|
||
(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.
Updated•12 years ago
|
Attachment #748461 -
Flags: review?(tschneidereit) → review+
Reporter | ||
Comment 3•12 years ago
|
||
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 4•12 years ago
|
||
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)
Reporter | ||
Comment 5•12 years ago
|
||
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)
Reporter | ||
Comment 6•12 years ago
|
||
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
Assignee | ||
Comment 7•12 years ago
|
||
I'll give this a shot on Monday.
Reporter | ||
Comment 8•12 years ago
|
||
(In reply to comment #7)
> I'll give this a shot on Monday.
Thanks!
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #749660 -
Flags: review?(bugs)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
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+
Assignee | ||
Comment 12•12 years ago
|
||
Flags: needinfo?(tschneidereit) → in-testsuite-
Target Milestone: --- → mozilla24
Comment 13•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•