Closed
Bug 461563
Opened 16 years ago
Closed 16 years ago
Allow WrapNative to return a jsval without the wrapper
Categories
(Core :: XPConnect, defect, P1)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: peterv, Assigned: peterv)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 2 obsolete files)
27.56 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
A lot of callers just want a jsval, and have a rooted jsval*. Currently they get the XPCWrappedNative and get the jsval from that, if we can return the jsval without the wrapper we can avoid an AddRef/Release of the cached wrappers.
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #344655 -
Attachment is obsolete: true
Attachment #349021 -
Flags: superreview?(jst)
Attachment #349021 -
Flags: review?(jst)
Assignee | ||
Updated•16 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla1.9.1
Updated•16 years ago
|
Attachment #349021 -
Flags: superreview?(jst)
Attachment #349021 -
Flags: superreview+
Attachment #349021 -
Flags: review?(jst)
Attachment #349021 -
Flags: review+
Comment 2•16 years ago
|
||
Comment on attachment 349021 [details] [diff] [review] v1.1 - In nsDOMClassInfo::WrapNative(): - *aHolder = nsnull; - if (!native) { *vp = JSVAL_NULL; + if (aHolder) { + *aHolder = nsnull; + } I say we just remove this code, all callers of this pass in nsCOMPtr's which are null to begin with. - In XPCConvert::NativeInterface2JSObject(): + *d = JSVAL_NULL; + if(dest) + *dest = nsnull; if(!src) + { return JS_TRUE; + } Surrounding code seems to suggest no brackets in this single line if. The rest looks good! r+sr=jst
Assignee | ||
Comment 3•16 years ago
|
||
We really want these performance improvements in 1.9.1.
Flags: blocking1.9.1?
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #349021 -
Attachment is obsolete: true
Attachment #350363 -
Flags: superreview+
Attachment #350363 -
Flags: review+
Comment 6•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/a4495a0cf2ff
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9.1 → mozilla1.9.1b3
Comment 7•16 years ago
|
||
backed this out while trying to identify a perf regression (bug 467102): http://hg.mozilla.org/mozilla-central/rev/6dc4b85cd8a7
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•16 years ago
|
||
See bug 467102 comment 6 for an explanation about the perf regression.
Assignee | ||
Comment 9•16 years ago
|
||
I just tried to reproduce the regression on the try server, but it doesn't show any difference on Twinopen for Windows XP (trunk: 251.44, trunk with patch: 251.11).
Comment 10•16 years ago
|
||
It's likely going to be worthwhile to try and land again when the tree is quiet.
Assignee | ||
Comment 11•16 years ago
|
||
I checked this back in, the Txul numbers look a little bit higher and more unstable on WinXP (not on Vista?). It's hard to tell if it's a real regression or just noise :-/. Maybe I should try to back out the patch in pieces, to see if any particular part makes the numbers more unstable.
Assignee | ||
Updated•16 years ago
|
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•