aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4regexp.cpp8
-rw-r--r--src/qml/jsruntime/qv4regexp_p.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4regexp.cpp b/src/qml/jsruntime/qv4regexp.cpp
index 349a0b21b0..2f1ede1b28 100644
--- a/src/qml/jsruntime/qv4regexp.cpp
+++ b/src/qml/jsruntime/qv4regexp.cpp
@@ -42,7 +42,7 @@ RegExpCache::~RegExpCache()
{
for (RegExpCache::Iterator it = begin(), e = end();
it != e; ++it)
- it.value()->d()->cache = 0;
+ it.value()->cache = 0;
clear();
}
@@ -69,8 +69,8 @@ Heap::RegExp *RegExp::create(ExecutionEngine* engine, const QString& pattern, bo
RegExpCache *cache = engine->regExpCache;
if (cache) {
- if (RegExp *result = cache->value(key))
- return result->d();
+ if (Heap::RegExp *result = cache->value(key))
+ return result;
}
Scope scope(engine);
@@ -80,7 +80,7 @@ Heap::RegExp *RegExp::create(ExecutionEngine* engine, const QString& pattern, bo
cache = engine->regExpCache = new RegExpCache;
result->d()->cache = cache;
- cache->insert(key, result);
+ cache->insert(key, result->d());
return result->d();
}
diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h
index 3219d56da7..b76c1ac0a0 100644
--- a/src/qml/jsruntime/qv4regexp_p.h
+++ b/src/qml/jsruntime/qv4regexp_p.h
@@ -133,7 +133,8 @@ inline RegExpCacheKey::RegExpCacheKey(const RegExp::Data *re)
inline uint qHash(const RegExpCacheKey& key, uint seed = 0) Q_DECL_NOTHROW
{ return qHash(key.pattern, seed); }
-class RegExpCache : public QHash<RegExpCacheKey, RegExp*>
+// ### GC
+class RegExpCache : public QHash<RegExpCacheKey, Heap::RegExp*>
{
public:
~RegExpCache();