summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/runtime_method.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bridge/runtime_method.cpp')
-rw-r--r--WebCore/bridge/runtime_method.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/WebCore/bridge/runtime_method.cpp b/WebCore/bridge/runtime_method.cpp
index 0af0af5..ffe4c0a 100644
--- a/WebCore/bridge/runtime_method.cpp
+++ b/WebCore/bridge/runtime_method.cpp
@@ -73,6 +73,18 @@ bool RuntimeMethod::getOwnPropertySlot(ExecState* exec, const Identifier& proper
return InternalFunction::getOwnPropertySlot(exec, propertyName, slot);
}
+bool RuntimeMethod::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor &descriptor)
+{
+ if (propertyName == exec->propertyNames().length) {
+ PropertySlot slot;
+ slot.setCustom(this, lengthGetter);
+ descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum);
+ return true;
+ }
+
+ return InternalFunction::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
static JSValue JSC_HOST_CALL callRuntimeMethod(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
{
RuntimeMethod* method = static_cast<RuntimeMethod*>(function);
@@ -82,13 +94,13 @@ static JSValue JSC_HOST_CALL callRuntimeMethod(ExecState* exec, JSObject* functi
RuntimeObjectImp* imp;
- if (thisValue.isObject(&RuntimeObjectImp::s_info)) {
+ if (thisValue.inherits(&RuntimeObjectImp::s_info)) {
imp = static_cast<RuntimeObjectImp*>(asObject(thisValue));
} else {
// If thisObj is the DOM object for a plugin, get the corresponding
// runtime object from the DOM object.
JSValue value = thisValue.get(exec, Identifier(exec, "__apple_runtime_object"));
- if (value.isObject(&RuntimeObjectImp::s_info))
+ if (value.inherits(&RuntimeObjectImp::s_info))
imp = static_cast<RuntimeObjectImp*>(asObject(value));
else
return throwError(exec, TypeError);