Closed Bug 451303 Opened 16 years ago Closed 16 years ago

Use JS_PropertyStub when defining XPConnect methods

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jorendorff, Unassigned)

References

Details

DefinePropertyIfFound, in xpcwrappednativejsops.cpp, currently passes nsnull to the getter and setter parameters of OBJ_DEFINE_PROPERTY. if(member->IsMethod()) { ... OBJ_DEFINE_PROPERTY(ccx, obj, id, funval, nsnull, nsnull, propFlags, nsnull); } This means the new property adopts the class's getter and setter. DOM quick stubs copies this behavior. mrbkap suggests instead using JSFUN_STUB_GSOPS when defining quick stubs for methods, so that the property will get JS_PropertyStub for its getter and setter. Assuming the behavior is correct, it'll definitely be faster. Maybe the idea generalizes to all XPCWrappedNative methods.
I think this is INVALID. Looking in xpcwrappednativejsops.cpp, all the _Proto_ classes already have the stub getter.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.