diff options
Diffstat (limited to 'WebCore/bridge/c')
-rw-r--r-- | WebCore/bridge/c/c_instance.cpp | 28 | ||||
-rw-r--r-- | WebCore/bridge/c/c_instance.h | 16 | ||||
-rw-r--r-- | WebCore/bridge/c/c_runtime.cpp | 8 | ||||
-rw-r--r-- | WebCore/bridge/c/c_runtime.h | 4 | ||||
-rw-r--r-- | WebCore/bridge/c/c_utility.cpp | 4 | ||||
-rw-r--r-- | WebCore/bridge/c/c_utility.h | 4 |
6 files changed, 32 insertions, 32 deletions
diff --git a/WebCore/bridge/c/c_instance.cpp b/WebCore/bridge/c/c_instance.cpp index 24b881f..97a89eb 100644 --- a/WebCore/bridge/c/c_instance.cpp +++ b/WebCore/bridge/c/c_instance.cpp @@ -101,7 +101,7 @@ bool CInstance::supportsInvokeDefaultMethod() const return _object->_class->invokeDefault; } -JSValuePtr CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args) +JSValue CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args) { // Overloading methods are not allowed by NPObjects. Should only be one // name match for a particular method. @@ -118,7 +118,7 @@ JSValuePtr CInstance::invokeMethod(ExecState* exec, const MethodList& methodList unsigned i; for (i = 0; i < count; i++) - convertValueToNPVariant(exec, args.at(exec, i), &cArgs[i]); + convertValueToNPVariant(exec, args.at(i), &cArgs[i]); // Invoke the 'C' method. #ifdef ANDROID_NPN_SETEXCEPTION @@ -137,7 +137,7 @@ JSValuePtr CInstance::invokeMethod(ExecState* exec, const MethodList& methodList for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValuePtr resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); #ifdef ANDROID_NPN_SETEXCEPTION MoveGlobalExceptionToExecState(exec); @@ -146,7 +146,7 @@ JSValuePtr CInstance::invokeMethod(ExecState* exec, const MethodList& methodList } -JSValuePtr CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) +JSValue CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) { if (!_object->_class->invokeDefault) return jsUndefined(); @@ -156,7 +156,7 @@ JSValuePtr CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) unsigned i; for (i = 0; i < count; i++) - convertValueToNPVariant(exec, args.at(exec, i), &cArgs[i]); + convertValueToNPVariant(exec, args.at(i), &cArgs[i]); // Invoke the 'C' method. #ifdef ANDROID_NPN_SETEXCEPTION @@ -174,7 +174,7 @@ JSValuePtr CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValuePtr resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); #ifdef ANDROID_NPN_SETEXCEPTION MoveGlobalExceptionToExecState(exec); @@ -187,7 +187,7 @@ bool CInstance::supportsConstruct() const return _object->_class->construct; } -JSValuePtr CInstance::invokeConstruct(ExecState* exec, const ArgList& args) +JSValue CInstance::invokeConstruct(ExecState* exec, const ArgList& args) { if (!_object->_class->construct) return jsUndefined(); @@ -197,7 +197,7 @@ JSValuePtr CInstance::invokeConstruct(ExecState* exec, const ArgList& args) unsigned i; for (i = 0; i < count; i++) - convertValueToNPVariant(exec, args.at(exec, i), &cArgs[i]); + convertValueToNPVariant(exec, args.at(i), &cArgs[i]); // Invoke the 'C' method. NPVariant resultVariant; @@ -212,12 +212,12 @@ JSValuePtr CInstance::invokeConstruct(ExecState* exec, const ArgList& args) for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValuePtr resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); return resultValue; } -JSValuePtr CInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const +JSValue CInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const { if (hint == PreferString) return stringValue(exec); @@ -226,26 +226,26 @@ JSValuePtr CInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint) return valueOf(exec); } -JSValuePtr CInstance::stringValue(ExecState* exec) const +JSValue CInstance::stringValue(ExecState* exec) const { char buf[1024]; snprintf(buf, sizeof(buf), "NPObject %p, NPClass %p", _object, _object->_class); return jsString(exec, buf); } -JSValuePtr CInstance::numberValue(ExecState* exec) const +JSValue CInstance::numberValue(ExecState* exec) const { // FIXME: Implement something sensible. return jsNumber(exec, 0); } -JSValuePtr CInstance::booleanValue() const +JSValue CInstance::booleanValue() const { // FIXME: Implement something sensible. return jsBoolean(false); } -JSValuePtr CInstance::valueOf(ExecState* exec) const +JSValue CInstance::valueOf(ExecState* exec) const { return stringValue(exec); } diff --git a/WebCore/bridge/c/c_instance.h b/WebCore/bridge/c/c_instance.h index ed107e9..f9e9de3 100644 --- a/WebCore/bridge/c/c_instance.h +++ b/WebCore/bridge/c/c_instance.h @@ -55,21 +55,21 @@ public: virtual Class *getClass() const; - virtual JSValuePtr valueOf(ExecState*) const; - virtual JSValuePtr defaultValue(ExecState*, PreferredPrimitiveType) const; + virtual JSValue valueOf(ExecState*) const; + virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const; - virtual JSValuePtr invokeMethod(ExecState*, const MethodList&, const ArgList&); + virtual JSValue invokeMethod(ExecState*, const MethodList&, const ArgList&); virtual bool supportsInvokeDefaultMethod() const; - virtual JSValuePtr invokeDefaultMethod(ExecState*, const ArgList&); + virtual JSValue invokeDefaultMethod(ExecState*, const ArgList&); virtual bool supportsConstruct() const; - virtual JSValuePtr invokeConstruct(ExecState*, const ArgList&); + virtual JSValue invokeConstruct(ExecState*, const ArgList&); virtual void getPropertyNames(ExecState*, PropertyNameArray&); - JSValuePtr stringValue(ExecState*) const; - JSValuePtr numberValue(ExecState*) const; - JSValuePtr booleanValue() const; + JSValue stringValue(ExecState*) const; + JSValue numberValue(ExecState*) const; + JSValue booleanValue() const; NPObject *getObject() const { return _object; } diff --git a/WebCore/bridge/c/c_runtime.cpp b/WebCore/bridge/c/c_runtime.cpp index 56220ee..9338775 100644 --- a/WebCore/bridge/c/c_runtime.cpp +++ b/WebCore/bridge/c/c_runtime.cpp @@ -71,9 +71,9 @@ void MoveGlobalExceptionToExecState(ExecState* exec) throwError(exec, GeneralError, *globalLastException); SetGlobalException(0); } -#endif // ANDROID_NPN_SETEXCEPTION +#endif // ANDROID_NPN_SETEXCEPTION -JSValuePtr CField::valueFromInstance(ExecState* exec, const Instance* inst) const +JSValue CField::valueFromInstance(ExecState* exec, const Instance* inst) const { const CInstance* instance = static_cast<const CInstance*>(inst); NPObject* obj = instance->getObject(); @@ -93,7 +93,7 @@ JSValuePtr CField::valueFromInstance(ExecState* exec, const Instance* inst) cons MoveGlobalExceptionToExecState(exec); #endif // ANDROID_NPN_SETEXCEPTION if (result) { - JSValuePtr result = convertNPVariantToValue(exec, &property, instance->rootObject()); + JSValue result = convertNPVariantToValue(exec, &property, instance->rootObject()); _NPN_ReleaseVariantValue(&property); return result; } @@ -101,7 +101,7 @@ JSValuePtr CField::valueFromInstance(ExecState* exec, const Instance* inst) cons return jsUndefined(); } -void CField::setValueToInstance(ExecState *exec, const Instance *inst, JSValuePtr aValue) const +void CField::setValueToInstance(ExecState *exec, const Instance *inst, JSValue aValue) const { const CInstance* instance = static_cast<const CInstance*>(inst); NPObject* obj = instance->getObject(); diff --git a/WebCore/bridge/c/c_runtime.h b/WebCore/bridge/c/c_runtime.h index 12e3b2e..676d949 100644 --- a/WebCore/bridge/c/c_runtime.h +++ b/WebCore/bridge/c/c_runtime.h @@ -38,8 +38,8 @@ class CField : public Field { public: CField(NPIdentifier ident) : _fieldIdentifier(ident) { } - virtual JSValuePtr valueFromInstance(ExecState*, const Instance*) const; - virtual void setValueToInstance(ExecState*, const Instance*, JSValuePtr) const; + virtual JSValue valueFromInstance(ExecState*, const Instance*) const; + virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const; NPIdentifier identifier() const { return _fieldIdentifier; } diff --git a/WebCore/bridge/c/c_utility.cpp b/WebCore/bridge/c/c_utility.cpp index 352163c..77b5de2 100644 --- a/WebCore/bridge/c/c_utility.cpp +++ b/WebCore/bridge/c/c_utility.cpp @@ -66,7 +66,7 @@ static String convertUTF8ToUTF16WithLatin1Fallback(const NPUTF8* UTF8Chars, int } // Variant value must be released with NPReleaseVariantValue() -void convertValueToNPVariant(ExecState* exec, JSValuePtr value, NPVariant* result) +void convertValueToNPVariant(ExecState* exec, JSValue value, NPVariant* result) { JSLock lock(false); @@ -105,7 +105,7 @@ void convertValueToNPVariant(ExecState* exec, JSValuePtr value, NPVariant* resul } } -JSValuePtr convertNPVariantToValue(ExecState* exec, const NPVariant* variant, RootObject* rootObject) +JSValue convertNPVariantToValue(ExecState* exec, const NPVariant* variant, RootObject* rootObject) { JSLock lock(false); diff --git a/WebCore/bridge/c/c_utility.h b/WebCore/bridge/c/c_utility.h index bd25e80..f69bba6 100644 --- a/WebCore/bridge/c/c_utility.h +++ b/WebCore/bridge/c/c_utility.h @@ -47,8 +47,8 @@ class RootObject; typedef uint16_t NPUTF16; WebCore::String convertNPStringToUTF16(const NPString *string); -void convertValueToNPVariant(ExecState*, JSValuePtr, NPVariant* result); -JSValuePtr convertNPVariantToValue(ExecState*, const NPVariant*, RootObject*); +void convertValueToNPVariant(ExecState*, JSValue, NPVariant* result); +JSValue convertNPVariantToValue(ExecState*, const NPVariant*, RootObject*); Identifier identifierFromNPIdentifier(const NPUTF8* name); } } |