aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4persistent_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-10 10:50:37 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-12 12:13:20 +0100
commit73a8f5f4845d34d74470b5a524d655be9eaf6dfc (patch)
treeb3ff01f6e3f7f8c51eaab36d868fbcff6fe5384b /src/qml/jsruntime/qv4persistent_p.h
parent943583ca408f5d419de03e54aab48557f5e5bebb (diff)
Cleanup debugger to be safe for the new GC
Added a bit of convenience to PersistentValue as well. Change-Id: I5a858079543b41ce1ef48a84e9350a7d6fa64501 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4persistent_p.h')
-rw-r--r--src/qml/jsruntime/qv4persistent_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h
index 57b30f74ec..43d1b6e374 100644
--- a/src/qml/jsruntime/qv4persistent_p.h
+++ b/src/qml/jsruntime/qv4persistent_p.h
@@ -81,11 +81,17 @@ public:
PersistentValue &operator =(ReturnedValue other);
template<typename T>
PersistentValue &operator=(Returned<T> *obj);
+ PersistentValue &operator=(Heap::Base *obj);
~PersistentValue();
ReturnedValue value() const {
return (d ? d->value.asReturnedValue() : Primitive::undefinedValue().asReturnedValue());
}
+ Managed *asManaged() const {
+ if (!d)
+ return 0;
+ return d->value.asManaged();
+ }
ExecutionEngine *engine() {
if (!d)