author | Jeff Walden <jwalden@mit.edu> |
Tue, 27 Jul 2010 17:10:54 -0700 | |
changeset 48607 | 0e1199f92cdf866c6d3fc6dedcf6ea23fa4924d6 |
parent 48606 | b17c8b9265858f3224f43c35df6b23d8bb94a490 |
child 48608 | 84b1306e4431ba6872bde0b275e1cfe515efdbf8 |
push id | 14748 |
push user | rsayre@mozilla.com |
push date | Sun, 01 Aug 2010 00:33:23 +0000 |
treeherder | mozilla-central@f0df797bb2a9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | redness |
bugs | 581744 |
milestone | 2.0b3pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/xpconnect/src/XPCDispInterface.cpp +++ b/js/src/xpconnect/src/XPCDispInterface.cpp @@ -328,40 +328,30 @@ JSBool XPCDispInterface::Member::GetValu // JSContext's global object. That would be bad! if((mType & RESOLVED) == 0) { JSContext* cx = ccx.GetSafeJSContext(); if(!cx) return JS_FALSE; intN argc; - intN flags; JSNative callback; // Is this a function or a parameterized getter/setter if(IsFunction() || IsParameterizedProperty()) { argc = GetParamCount(); - flags = 0; callback = XPC_IDispatch_CallMethod; } else { - if(IsSetter()) - { - flags = JSFUN_GETTER | JSFUN_SETTER; - } - else - { - flags = JSFUN_GETTER; - } argc = 0; callback = XPC_IDispatch_GetterSetter; } - JSFunction *fun = JS_NewFunction(cx, callback, argc, flags, nsnull, + JSFunction *fun = JS_NewFunction(cx, callback, argc, 0, nsnull, JS_GetStringBytes(JSID_TO_STRING(mName))); if(!fun) return JS_FALSE; JSObject* funobj = JS_GetFunctionObject(fun); if(!funobj) return JS_FALSE;
--- a/js/src/xpconnect/src/xpcwrappednativeinfo.cpp +++ b/js/src/xpconnect/src/xpcwrappednativeinfo.cpp @@ -162,39 +162,33 @@ XPCNativeMember::Resolve(XPCCallContext& return JS_TRUE; } // else... // This is a method or attribute - we'll be needing a function object intN argc; - intN flags; JSNative callback; if(IsMethod()) { const nsXPTMethodInfo* info; if(NS_FAILED(iface->GetInterfaceInfo()->GetMethodInfo(mIndex, &info))) return JS_FALSE; // Note: ASSUMES that retval is last arg. argc = (intN) info->GetParamCount(); if(argc && info->GetParam((uint8)(argc-1)).IsRetval()) argc-- ; - flags = 0; callback = XPC_WN_CallMethod; } else { - if(IsWritableAttribute()) - flags = JSFUN_GETTER | JSFUN_SETTER; - else - flags = JSFUN_GETTER; argc = 0; callback = XPC_WN_GetterSetter; } // We need to use the safe context for this thread because we don't want // to parent the new (and cached forever!) function object to the current // JSContext's global object. That would be bad! @@ -203,17 +197,17 @@ XPCNativeMember::Resolve(XPCCallContext& return JS_FALSE; const char *memberName = iface->GetMemberName(ccx, this); JSFunction *fun; // Switching contexts, suspend the old and enter the new request. { JSAutoRequest req(cx); - fun = JS_NewFunction(cx, callback, argc, flags, nsnull, memberName); + fun = JS_NewFunction(cx, callback, argc, 0, nsnull, memberName); } if(!fun) return JS_FALSE; JSObject* funobj = JS_GetFunctionObject(fun); if(!funobj) return JS_FALSE;
--- a/js/src/xpconnect/src/xpcwrappednativejsops.cpp +++ b/js/src/xpconnect/src/xpcwrappednativejsops.cpp @@ -372,17 +372,17 @@ DefinePropertyIfFound(XPCCallContext& cc // A security check is done on a per-get basis. JSFunction* fun; id = rt->GetStringID(XPCJSRuntime::IDX_WRAPPED_JSOBJECT); name = rt->GetStringName(XPCJSRuntime::IDX_WRAPPED_JSOBJECT); fun = JS_NewFunction(ccx, XPC_WN_DoubleWrappedGetter, - 0, JSFUN_GETTER, obj, name); + 0, 0, obj, name); if(!fun) return JS_FALSE; JSObject* funobj = JS_GetFunctionObject(fun); if(!funobj) return JS_FALSE;