From 0cf913d4b73ae1bf7182e6eeaab518fe5d7a2fe8 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 19 Aug 2009 20:14:08 +0200 Subject: Do not pass JSValue per const reference It is a POD with the size of a pointer --- src/script/api/qscriptengine.cpp | 4 ++-- src/script/api/qscriptengine_p.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 0e47cde..1b8573c 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -457,7 +457,7 @@ QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec) return static_cast(exec->globalData().clientData)->engine; } -bool isFunction(const JSC::JSValue &value) +bool isFunction(JSC::JSValue value) { if (!value || !value.isObject()) return false; @@ -2284,7 +2284,7 @@ QScriptContext *QScriptEngine::pushContext() return the new top frame. (might be the same as exec if a new stackframe was not needed) or 0 if stack overflow */ -JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, const JSC::JSValue &_thisObject, +JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSValue _thisObject, const JSC::ArgList& args, JSC::JSObject *callee, bool calledAsConstructor) { JSC::JSValue thisObject = _thisObject; diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 64af653..cf773b6 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -98,7 +98,7 @@ namespace QScript //some conversion helper functions QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec); - bool isFunction(const JSC::JSValue &value); + bool isFunction(JSC::JSValue value); } class QScriptEnginePrivate @@ -155,7 +155,7 @@ public: JSC::JSValue toUsableValue(JSC::JSValue value); static JSC::JSValue thisForContext(JSC::ExecState *frame); - JSC::CallFrame *pushContext(JSC::CallFrame *exec, const JSC::JSValue &thisObject, const JSC::ArgList& args, + JSC::CallFrame *pushContext(JSC::CallFrame *exec, JSC::JSValue thisObject, const JSC::ArgList& args, JSC::JSObject *callee, bool calledAsConstructor = false); void popContext(); -- cgit v0.12