summaryrefslogtreecommitdiffstats
path: root/src/script/bridge/qscriptfunction_p.h
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-05 09:26:32 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-05 09:27:50 (GMT)
commitf22c8da7c2c98cb25642c255c4b4f05fa4e4da3d (patch)
tree6d782174703c5e223701e67ca34f391fc8605d79 /src/script/bridge/qscriptfunction_p.h
parent4a3cf019b7261779ca3e8267278bf07947132db4 (diff)
downloadQt-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/bridge/qscriptfunction_p.h')
-rw-r--r--src/script/bridge/qscriptfunction_p.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/script/bridge/qscriptfunction_p.h b/src/script/bridge/qscriptfunction_p.h
index 360b40c..4901b72 100644
--- a/src/script/bridge/qscriptfunction_p.h
+++ b/src/script/bridge/qscriptfunction_p.h
@@ -72,18 +72,20 @@ public:
// work around CELL_SIZE limitation
struct Data
{
- QScriptEngine *engine;
QScriptEngine::FunctionSignature function;
};
- FunctionWrapper(QScriptEngine *, int length, const JSC::Identifier&, QScriptEngine::FunctionSignature);
+ FunctionWrapper(JSC::ExecState*, int length, const JSC::Identifier&,
+ QScriptEngine::FunctionSignature);
~FunctionWrapper();
private:
virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
- static JSC::JSValue JSC_HOST_CALL proxyCall(JSC::ExecState *, JSC::JSObject *, JSC::JSValue, const JSC::ArgList &);
- static JSC::JSObject* proxyConstruct(JSC::ExecState *, JSC::JSObject *, const JSC::ArgList &);
+ static JSC::JSValue JSC_HOST_CALL proxyCall(JSC::ExecState *, JSC::JSObject *,
+ JSC::JSValue, const JSC::ArgList &);
+ static JSC::JSObject* proxyConstruct(JSC::ExecState *, JSC::JSObject *,
+ const JSC::ArgList &);
private:
Data *data;
@@ -95,19 +97,21 @@ public:
// work around CELL_SIZE limitation
struct Data
{
- QScriptEngine *engine;
QScriptEngine::FunctionWithArgSignature function;
void *arg;
};
- FunctionWithArgWrapper(QScriptEngine *, int length, const JSC::Identifier&, QScriptEngine::FunctionWithArgSignature, void *);
+ FunctionWithArgWrapper(JSC::ExecState*, int length, const JSC::Identifier&,
+ QScriptEngine::FunctionWithArgSignature, void *);
~FunctionWithArgWrapper();
private:
virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
- static JSC::JSValue JSC_HOST_CALL proxyCall(JSC::ExecState *, JSC::JSObject *, JSC::JSValue , const JSC::ArgList &);
- static JSC::JSObject* proxyConstruct(JSC::ExecState *, JSC::JSObject *, const JSC::ArgList &);
+ static JSC::JSValue JSC_HOST_CALL proxyCall(JSC::ExecState *, JSC::JSObject *,
+ JSC::JSValue , const JSC::ArgList &);
+ static JSC::JSObject* proxyConstruct(JSC::ExecState *, JSC::JSObject *,
+ const JSC::ArgList &);
private:
Data *data;