Closed
Bug 541456
Opened 15 years ago
Closed 15 years ago
change ConvertSupportsTojsvals not to use js_AllocStack
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: luke, Assigned: luke)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
Currently nsJSContext::CallEventHandler calls JS_CallFunctionValue with a js_AllocStack'd argument array. This conflicts with upcoming changes which restrict how the stack is used. Additionally, this seems wasteful because JS_CallFunctionValue calls js_InternalInvoke which just js_AllocStack/memcpy's a *second* arg vector. So, should be an all-around win.
Assignee | ||
Comment 1•15 years ago
|
||
I spoke too soon. Looking at the control flow, it appears that non-js_AllocStack'd data can also be used to call JS_CallFunctionValue. I'll use the tempPool and an auto temp value rooter instead.
Summary: change nsJSContext::CallEventHandler to use js_Invoke → change ConvertSupportsTojsvals not to use js_AllocStack
Assignee | ||
Comment 2•15 years ago
|
||
Here's the basic idea.
Added a snappy new js::LazilyConstructed template to jstl.h so that I can write:
js::LazilyConstructed<JSAutoTempValueRooter> tvr;
...
if (...) {
tvr.construct(cx, argv, argc);
}
and have tvr do the right thing.
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #423109 -
Attachment is obsolete: true
Attachment #423368 -
Flags: review?
Assignee | ||
Updated•15 years ago
|
Attachment #423368 -
Flags: review? → review?(jst)
Updated•15 years ago
|
Attachment #423368 -
Flags: review?(jst) → review+
Comment 4•15 years ago
|
||
Comment on attachment 423368 [details] [diff] [review]
for review
Looks good, r=jst!
Assignee | ||
Comment 5•15 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 6•15 years ago
|
||
Luke, anything left to do here, should this bug be marked fixed now?
Assignee | ||
Comment 7•15 years ago
|
||
Sayre usually merges to m-c, posts the cset and then marks as fixed.
Assignee | ||
Comment 8•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•