summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-27 14:32:16 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-27 17:58:12 (GMT)
commitb9026b5f2182db6f0e607035cb4ac3798bf09054 (patch)
tree4b3c06b391e10d063f3301705e7b8f314c9d3826 /src/script/bridge
parent4832462e2f0a3f68485ae85efff368e3346d5c1f (diff)
downloadQt-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.cpp4
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;