summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue.cpp
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/api/qscriptvalue.cpp
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/api/qscriptvalue.cpp')
-rw-r--r--src/script/api/qscriptvalue.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 7693af8..5ace14d 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1982,7 +1982,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
JSC::JSValue jscThisObject = eng_p->scriptValueToJSCValue(thisObject);
if (!jscThisObject || !jscThisObject.isObject())
- jscThisObject = eng_p->globalObject;
+ jscThisObject = eng_p->globalObject();
QVector<JSC::JSValue> argsVector;
argsVector.resize(args.size());
@@ -2057,7 +2057,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
JSC::JSValue jscThisObject = eng_p->scriptValueToJSCValue(thisObject);
if (!jscThisObject || !jscThisObject.isObject())
- jscThisObject = eng_p->globalObject;
+ jscThisObject = eng_p->globalObject();
JSC::JSValue array = eng_p->scriptValueToJSCValue(arguments);
// copied from runtime/FunctionPrototype.cpp, functionProtoFuncApply()