diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-05 09:26:32 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-05 09:27:50 (GMT) |
commit | f22c8da7c2c98cb25642c255c4b4f05fa4e4da3d (patch) | |
tree | 6d782174703c5e223701e67ca34f391fc8605d79 /src/script/api | |
parent | 4a3cf019b7261779ca3e8267278bf07947132db4 (diff) | |
download | Qt-f22c8da7c2c98cb25642c255c4b4f05fa4e4da3d.zip Qt-f22c8da7c2c98cb25642c255c4b4f05fa4e4da3d.tar.gz Qt-f22c8da7c2c98cb25642c255c4b4f05fa4e4da3d.tar.bz2 |
don't store QScriptEngine pointer in native function wrappers
We can infer it from the JSC environment when the function is
actually called.
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 9fba7cb..02a5e2d 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1512,7 +1512,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun, { Q_D(QScriptEngine); JSC::ExecState* exec = d->currentFrame; - JSC::JSValue function = new (exec)QScript::FunctionWrapper(this, length, JSC::Identifier(exec, ""), fun); + JSC::JSValue function = new (exec)QScript::FunctionWrapper(exec, length, JSC::Identifier(exec, ""), fun); QScriptValue result = d->scriptValueFromJSCValue(function); result.setProperty(QLatin1String("prototype"), prototype, QScriptValue::Undeletable); const_cast<QScriptValue&>(prototype) @@ -1838,7 +1838,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun, in { Q_D(QScriptEngine); JSC::ExecState* exec = d->currentFrame; - JSC::JSValue function = new (exec)QScript::FunctionWrapper(this, length, JSC::Identifier(exec, ""), fun); + JSC::JSValue function = new (exec)QScript::FunctionWrapper(exec, length, JSC::Identifier(exec, ""), fun); QScriptValue result = d->scriptValueFromJSCValue(function); QScriptValue proto = newObject(); result.setProperty(QLatin1String("prototype"), proto, QScriptValue::Undeletable); @@ -1855,7 +1855,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionWithArgSignature { Q_D(QScriptEngine); JSC::ExecState* exec = d->currentFrame; - JSC::JSValue function = new (exec)QScript::FunctionWithArgWrapper(this, /*length=*/0, JSC::Identifier(exec, ""), fun, arg); + JSC::JSValue function = new (exec)QScript::FunctionWithArgWrapper(exec, /*length=*/0, JSC::Identifier(exec, ""), fun, arg); QScriptValue result = d->scriptValueFromJSCValue(function); QScriptValue proto = newObject(); result.setProperty(QLatin1String("prototype"), proto, QScriptValue::Undeletable); |