diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-27 14:32:16 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-27 17:58:12 (GMT) |
commit | b9026b5f2182db6f0e607035cb4ac3798bf09054 (patch) | |
tree | 4b3c06b391e10d063f3301705e7b8f314c9d3826 /src/script/bridge | |
parent | 4832462e2f0a3f68485ae85efff368e3346d5c1f (diff) | |
download | Qt-b9026b5f2182db6f0e607035cb4ac3798bf09054.zip Qt-b9026b5f2182db6f0e607035cb4ac3798bf09054.tar.gz Qt-b9026b5f2182db6f0e607035cb4ac3798bf09054.tar.bz2 |
don't rely on custom global object to get GC callback
Install custom ClientData on JSGlobalData instance instead.
Also some cleanups to avoid globalObject et al being accessed
directly.
Killed the proxying scheme employed in setGlobalObject() since it
didn't work; if you stored the original Global Object and replaced
it with another object, then added properties to the new object,
they would show up in the old object, too (because the old object
would always proxy to whatever the current Global Object was).
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptfunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp index 8d2f0c8..ee5c9c3 100644 --- a/src/script/bridge/qscriptfunction.cpp +++ b/src/script/bridge/qscriptfunction.cpp @@ -32,7 +32,7 @@ namespace QScript FunctionWrapper::FunctionWrapper(QScriptEngine *engine, int length, const JSC::Identifier &name, QScriptEngine::FunctionSignature function) - : JSC::PrototypeFunction(QScriptEnginePrivate::get(engine)->globalObject->globalExec(), + : JSC::PrototypeFunction(QScriptEnginePrivate::get(engine)->globalExec(), length, name, proxyCall), data(new Data()) { data->engine = engine; @@ -85,7 +85,7 @@ JSC::JSObject* FunctionWrapper::proxyConstruct(JSC::ExecState *exec, JSC::JSObje FunctionWithArgWrapper::FunctionWithArgWrapper(QScriptEngine *engine, int length, const JSC::Identifier &name, QScriptEngine::FunctionWithArgSignature function, void *arg) - : JSC::PrototypeFunction(QScriptEnginePrivate::get(engine)->globalObject->globalExec(), + : JSC::PrototypeFunction(QScriptEnginePrivate::get(engine)->globalExec(), length, name, proxyCall), data(new Data()) { data->engine = engine; |