Closed
Bug 807179
Opened 13 years ago
Closed 13 years ago
Give JSPropertyDescriptor a constructor
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: mccr8, Assigned: bholley)
References
Details
(Keywords: sec-want)
Attachments
(1 file)
|
3.27 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
JSPropertyDescriptor is a struct, which means you have to remember to initialize it, which causes badness if you don't. Right now, I think we do this at the API boundary, but maybe we can avoid that. There's also code like in NativeToString in BindingUtils.cpp that would be a little neater if we had better ways to initialize these.
Comment 1•13 years ago
|
||
I don't know what is being generated, but I thought these JSPropertyDescriptor things were globally allocated. In that case, it would be bad for startup time if there were a lot of them and they all had constructor calls.
| Reporter | ||
Comment 2•13 years ago
|
||
The ones I'm familiar with, from the browser side, are on the stack, but perhaps there are a bunch in the engine, too.
Comment 3•13 years ago
|
||
I guess you could add a constructor with printf and see how many happen before main() :)
| Assignee | ||
Comment 4•13 years ago
|
||
This is a total footgun. Attaching a patch.
Luke, are you sure you're not talking about JSPropertySpecs? I'm not aware of
anywhere we statically allocate JSPropertyDescriptors...
Attachment #678566 -
Flags: review?(luke)
| Assignee | ||
Updated•13 years ago
|
Assignee: general → bobbyholley+bmo
Comment 5•13 years ago
|
||
Heh, yes, I am confusing JSPropertySpec with JSPropertyDescriptor. Carry on.
Updated•13 years ago
|
Attachment #678566 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 6•13 years ago
|
||
| Reporter | ||
Comment 7•13 years ago
|
||
Yay! Some of JSAutoPropertyRooter can probably also be torn out at some point.
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•