Closed Bug 1122758 Opened 11 years ago Closed 11 years ago

Get rid of XPCJSObjectHolder::newHolder()

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

This is a weird function. I think it just makes sense to inline it and make the ctor public.
I'm not entirely sure this is a good idea, but it seems like an improvement to me. try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c1f3b868c1f6
Attachment #8554621 - Flags: review?(gkrizsanits)
Comment on attachment 8554621 [details] [diff] [review] Get rid of XPCJSObjectHolder::newHolder(). Review of attachment 8554621 [details] [diff] [review]: ----------------------------------------------------------------- I think it's definitely an improvement, and sorry about the delay I was having a holiday. ::: js/xpconnect/src/nsXPConnect.cpp @@ +823,5 @@ > > if (NS_SUCCEEDED(rv) && !rval.isPrimitive()) { > + JSObject *obj = rval.toObjectOrNull(); > + if (!obj) > + return NS_ERROR_FAILURE; I think the !rval.isPrimitive() ensures that rval is a valid object, so why do we need this check here?
Attachment #8554621 - Flags: review?(gkrizsanits) → review+
(In reply to Gabor Krizsanits [:krizsa :gabor] from comment #2) > I think the !rval.isPrimitive() ensures that rval is a valid object, so why > do we need this check here? Good point. try run with that check removed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f78fec40d632
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: