diff options
Diffstat (limited to 'JavaScriptGlue/UserObjectImp.cpp')
| -rw-r--r-- | JavaScriptGlue/UserObjectImp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/JavaScriptGlue/UserObjectImp.cpp b/JavaScriptGlue/UserObjectImp.cpp index 1fbb982..1728a7e 100644 --- a/JavaScriptGlue/UserObjectImp.cpp +++ b/JavaScriptGlue/UserObjectImp.cpp @@ -56,18 +56,18 @@ CallType UserObjectImp::getCallData(CallData& callData) return fJSUserObject ? fJSUserObject->getCallData(callData) : CallTypeNone; } -JSValue UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const ArgList &args) +JSValue UserObjectImp::callAsFunction(ExecState *exec) { JSValue result = jsUndefined(); - JSUserObject* jsThisObj = KJSValueToJSObject(thisObj, exec); + JSUserObject* jsThisObj = KJSValueToJSObject(exec->hostThisValue().toThisObject(exec), exec); if (jsThisObj) { - CFIndex argCount = args.size(); + CFIndex argCount = exec->argumentCount(); CFArrayCallBacks arrayCallBacks; JSTypeGetCFArrayCallBacks(&arrayCallBacks); CFMutableArrayRef jsArgs = CFArrayCreateMutable(0, 0, &arrayCallBacks); if (jsArgs) { for (CFIndex i = 0; i < argCount; i++) { - JSUserObject* jsArg = KJSValueToJSObject(args.at(i), exec); + JSUserObject* jsArg = KJSValueToJSObject(exec->argument(i), exec); CFArrayAppendValue(jsArgs, (void*)jsArg); jsArg->Release(); } @@ -112,9 +112,9 @@ void UserObjectImp::getOwnPropertyNames(ExecState *exec, PropertyNameArray& prop JSObject::getOwnPropertyNames(exec, propertyNames, mode); } -JSValue UserObjectImp::userObjectGetter(ExecState*, const Identifier& propertyName, const PropertySlot& slot) +JSValue UserObjectImp::userObjectGetter(ExecState*, JSValue slotBase, const Identifier& propertyName) { - UserObjectImp *thisObj = static_cast<UserObjectImp *>(asObject(slot.slotBase())); + UserObjectImp *thisObj = static_cast<UserObjectImp *>(asObject(slotBase)); // getOwnPropertySlot should have guarded against a null fJSUserObject. assert(thisObj->fJSUserObject); @@ -190,7 +190,7 @@ JSValue UserObjectImp::toPrimitive(ExecState *exec, JSType) const } else if (cfType == CFNumberGetTypeID()) { double d = 0.0; CFNumberGetValue((CFNumberRef)cfValue, kCFNumberDoubleType, &d); - result = jsNumber(exec, d); + result = jsNumber(d); } else if (cfType == CFURLGetTypeID()) { CFURLRef absURL = CFURLCopyAbsoluteURL((CFURLRef)cfValue); if (absURL) { |
