summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/parser/ParserArena.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/parser/ParserArena.h')
-rw-r--r--Source/JavaScriptCore/parser/ParserArena.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/parser/ParserArena.h b/Source/JavaScriptCore/parser/ParserArena.h
index 49f0ab6bf..067b83a26 100644
--- a/Source/JavaScriptCore/parser/ParserArena.h
+++ b/Source/JavaScriptCore/parser/ParserArena.h
@@ -161,7 +161,12 @@ namespace JSC {
bool isEmpty() const;
JS_EXPORT_PRIVATE void reset();
- IdentifierArena& identifierArena() { return *m_identifierArena; }
+ IdentifierArena& identifierArena()
+ {
+ if (UNLIKELY (!m_identifierArena))
+ m_identifierArena = adoptPtr(new IdentifierArena);
+ return *m_identifierArena;
+ }
private:
static const size_t freeablePoolSize = 8000;