summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptstring.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-03-26 12:59:26 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-03-26 15:16:49 (GMT)
commit61b488a965eebc52104243dce21eaeb203cfecae (patch)
treec7370f9f384a9a89c5fa5f269a74f30833399ece /src/script/api/qscriptstring.cpp
parent6829ee30f02f162bbb399000c853c8d680f8f8de (diff)
downloadQt-61b488a965eebc52104243dce21eaeb203cfecae.zip
Qt-61b488a965eebc52104243dce21eaeb203cfecae.tar.gz
Qt-61b488a965eebc52104243dce21eaeb203cfecae.tar.bz2
QtScript: Make sure the old identifier table is restored
Use a shim to take care of that.
Diffstat (limited to 'src/script/api/qscriptstring.cpp')
-rw-r--r--src/script/api/qscriptstring.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/script/api/qscriptstring.cpp b/src/script/api/qscriptstring.cpp
index 7978b61..d0b0ffd 100644
--- a/src/script/api/qscriptstring.cpp
+++ b/src/script/api/qscriptstring.cpp
@@ -92,8 +92,12 @@ QScriptString::~QScriptString()
d->ref.ref(); // avoid deletion
break;
case QScriptStringPrivate::HeapAllocated:
- if (d->engine && (d->ref == 1))
+ if (d->engine && (d->ref == 1)) {
+ // Make sure the identifier is removed from the correct engine.
+ QScript::APIShim(d->engine);
+ d->identifier = JSC::Identifier();
d->engine->unregisterScriptString(d);
+ }
break;
}
}