Closed
Bug 541456
Opened 14 years ago
Closed 14 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)
11.91 KB,
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•14 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•14 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•14 years ago
|
||
Attachment #423109 -
Attachment is obsolete: true
Attachment #423368 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #423368 -
Flags: review? → review?(jst)
Updated•14 years ago
|
Attachment #423368 -
Flags: review?(jst) → review+
Comment 4•14 years ago
|
||
Comment on attachment 423368 [details] [diff] [review] for review Looks good, r=jst!
Assignee | ||
Comment 5•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/2b3944b2a5c2
Whiteboard: fixed-in-tracemonkey
Comment 6•14 years ago
|
||
Luke, anything left to do here, should this bug be marked fixed now?
Assignee | ||
Comment 7•14 years ago
|
||
Sayre usually merges to m-c, posts the cset and then marks as fixed.
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2b3944b2a5c2
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•