Closed
Bug 708754
Opened 13 years ago
Closed 13 years ago
Use IDL for jsdIDebuggerService::WrapValue and remove WrapJSValue
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
Attachments
(1 file)
3.98 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
We can get rid of the nsAXPCNativeCallContext stuff, and WrapJSValue becomes rather redundant after that.
Attachment #580119 -
Flags: review?(bobbyholley+bmo)
Comment 1•13 years ago
|
||
Comment on attachment 580119 [details] [diff] [review] Patch v1 >- nsCOMPtr<jsdIValue> jsdValue; >- jsd->WrapJSValue(v, getter_AddRefs(jsdValue)); >- *aRetVal = jsdValue.forget().get(); >+ nsRefPtr<jsdIValue> jsdValue; >+ rv = jsd->WrapValue(v, getter_AddRefs(jsdValue)); >+ NS_ENSURE_SUCCESS(rv, rv); >+ jsdValue.forget(aRetVal); Why the switch from nsCOMPtr to nsRefPtr here?
Assignee | ||
Comment 2•13 years ago
|
||
Because nsCOMPtr::forget can only be called with T**, while nsRefPtr's version is happy with superclasses. (Yes, silly, I know; that's Gecko for you.)
Comment 3•13 years ago
|
||
Comment on attachment 580119 [details] [diff] [review] Patch v1 (In reply to Ms2ger from comment #2) > Because nsCOMPtr::forget can only be called with T**, while nsRefPtr's > version is happy with superclasses. (Yes, silly, I know; that's Gecko for > you.) Hm, in that case I'd rather fix nsCOMPtr (looks like it just needs a template<typename I>), or failing that use the slightly more awkward syntax we had here before. We might as well use COM pointers for COM objects. r+ once that's taken care of.
Attachment #580119 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 4•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/21fbcd2f27a8 d-d-n in case anybody used WrapJSValue.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Updated•4 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•