Changeset 31936 in webkit for trunk/JavaScriptCore/kjs/lexer.cpp
- Timestamp:
- Apr 16, 2008, 2:30:01 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/lexer.cpp
r31811 r31936 33 33 #include <string.h> 34 34 #include <wtf/Assertions.h> 35 #if USE(MULTIPLE_THREADS) 36 #include <wtf/ThreadSpecific.h> 37 #endif 35 38 #include <wtf/unicode/Unicode.h> 36 39 … … 63 66 Lexer& lexer() 64 67 { 65 ASSERT(JSLock::currentThreadIsHoldingLock()); 66 67 // FIXME: We'd like to avoid calling new here, but we don't currently 68 // support tearing down the Lexer at app quit time, since that would involve 69 // tearing down its UString data members without holding the JSLock. 70 static Lexer* staticLexer = new Lexer; 68 #if USE(MULTIPLE_THREADS) 69 static ThreadSpecific<Lexer> staticLexer; 71 70 return *staticLexer; 71 #else 72 static Lexer staticLexer; 73 return staticLexer; 74 #endif 72 75 } 73 76
Note:
See TracChangeset
for help on using the changeset viewer.