aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4debugging.cpp')
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 8080ed6c62..2b6dc4616c 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -209,6 +209,9 @@ static void realDumpValue(QV4::Value v, QV4::ExecutionContext *ctx, std::string
{
using namespace QV4;
using namespace std;
+
+ Scope scope(ctx);
+
cout << prefix << "tag: " << hex << v.tag << dec << endl << prefix << "\t-> ";
switch (v.type()) {
case Value::Undefined_Type: cout << "Undefined" << endl; return;
@@ -271,10 +274,11 @@ static void realDumpValue(QV4::Value v, QV4::ExecutionContext *ctx, std::string
cout << prefix << "properties:" << endl;
ForEachIteratorObject it(ctx, o);
- for (Value name = it.nextPropertyName(); !name.isNull(); name = it.nextPropertyName()) {
- cout << prefix << "\t\"" << qPrintable(name.stringValue()->toQString()) << "\"" << endl;
+ QV4::ScopedValue name(scope);
+ for (name = it.nextPropertyName(); !name->isNull(); name = it.nextPropertyName()) {
+ cout << prefix << "\t\"" << qPrintable(name->stringValue()->toQString()) << "\"" << endl;
PropertyAttributes attrs;
- Property *d = o->__getOwnProperty__(name.stringValue(), &attrs);
+ Property *d = o->__getOwnProperty__(name->stringValue(), &attrs);
Value pval = Value::fromReturnedValue(o->getValue(d, attrs));
cout << prefix << "\tvalue:" << endl;
realDumpValue(pval, ctx, prefix + "\t");