summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/RegExpCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExpCache.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/RegExpCache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/runtime/RegExpCache.cpp b/Source/JavaScriptCore/runtime/RegExpCache.cpp
index 8f4660a78..126004701 100644
--- a/Source/JavaScriptCore/runtime/RegExpCache.cpp
+++ b/Source/JavaScriptCore/runtime/RegExpCache.cpp
@@ -29,7 +29,7 @@
#include "config.h"
#include "RegExpCache.h"
-#include "JSCInlines.h"
+#include "Operations.h"
#include "RegExpObject.h"
#include "StrongInlines.h"
@@ -60,6 +60,7 @@ void RegExpCache::finalize(Handle<Unknown> handle, void*)
{
RegExp* regExp = static_cast<RegExp*>(handle.get().asCell());
weakRemove(m_weakCache, regExp->key(), regExp);
+ regExp->invalidateCode();
}
void RegExpCache::addToStrongCache(RegExp* regExp)
@@ -73,7 +74,7 @@ void RegExpCache::addToStrongCache(RegExp* regExp)
m_nextEntryInStrongCache = 0;
}
-void RegExpCache::deleteAllCode()
+void RegExpCache::invalidateCode()
{
for (int i = 0; i < maxStrongCacheableEntries; i++)
m_strongCache[i].clear();
@@ -84,7 +85,7 @@ void RegExpCache::deleteAllCode()
RegExp* regExp = it->value.get();
if (!regExp) // Skip zombies.
continue;
- regExp->deleteCode();
+ regExp->invalidateCode();
}
}