summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-23 13:16:51 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-23 13:16:51 (GMT)
commit902ceabbca3cd3f3a06180aba64b0f81b3f1dba4 (patch)
tree64efeee683cd31c2a0f7511fecc3c124c91249fe /src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h
parent9161598b9cb374889ca6c69831c035c1eaa4d56e (diff)
parentbbcef4e4b596324aeda80e0aa7d313c586454740 (diff)
downloadQt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.zip
Qt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.tar.gz
Qt-902ceabbca3cd3f3a06180aba64b0f81b3f1dba4.tar.bz2
Merge commit 'qt/4.6' into mmfphonon
Conflicts: demos/embedded/fluidlauncher/config_s60/config.xml demos/embedded/fluidlauncher/fluidlauncher.pro src/corelib/io/io.pri src/gui/kernel/qapplication_s60.cpp src/gui/kernel/qwidget_s60.cpp src/s60installs/qt_libs.pro
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h
index 987c59f..4d113fe 100644
--- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h
+++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h
@@ -318,11 +318,12 @@ bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValue value, JSValue
for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {
if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) {
+ JSValueRef valueRef = toRef(exec, value);
JSValueRef exception = 0;
bool result;
{
JSLock::DropAllLocks dropAllLocks(exec);
- result = hasInstance(execRef, thisRef, toRef(exec, value), &exception);
+ result = hasInstance(execRef, thisRef, valueRef, &exception);
}
exec->setException(toJS(exec, exception));
return result;
@@ -372,7 +373,7 @@ JSValue JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObject,
}
template <class Base>
-void JSCallbackObject<Base>::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
{
JSContextRef execRef = toRef(exec);
JSObjectRef thisRef = toRef(this);
@@ -406,7 +407,7 @@ void JSCallbackObject<Base>::getPropertyNames(ExecState* exec, PropertyNameArray
}
}
- Base::getPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames);
}
template <class Base>
@@ -428,11 +429,13 @@ double JSCallbackObject<Base>::toNumber(ExecState* exec) const
JSLock::DropAllLocks dropAllLocks(exec);
value = convertToType(ctx, thisRef, kJSTypeNumber, &exception);
}
- exec->setException(toJS(exec, exception));
- if (value) {
- double dValue;
- return toJS(exec, value).getNumber(dValue) ? dValue : NaN;
+ if (exception) {
+ exec->setException(toJS(exec, exception));
+ return 0;
}
+
+ double dValue;
+ return toJS(exec, value).getNumber(dValue) ? dValue : NaN;
}
return Base::toNumber(exec);
@@ -452,11 +455,11 @@ UString JSCallbackObject<Base>::toString(ExecState* exec) const
JSLock::DropAllLocks dropAllLocks(exec);
value = convertToType(ctx, thisRef, kJSTypeString, &exception);
}
- exec->setException(toJS(exec, exception));
- if (value)
- return toJS(exec, value).getString();
- if (exception)
+ if (exception) {
+ exec->setException(toJS(exec, exception));
return "";
+ }
+ return toJS(exec, value).getString();
}
return Base::toString(exec);