Changeset 34065 in webkit for trunk/JavaScriptCore/profiler/Profiler.cpp
- Timestamp:
- May 23, 2008, 1:56:21 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profiler.cpp
r34054 r34065 40 40 namespace KJS { 41 41 42 static Profiler* sharedProfiler = 0;43 42 static const char* GlobalCodeExecution = "(program)"; 44 43 static const char* AnonymousFunction = "(anonymous function)"; … … 48 47 static CallIdentifier createCallIdentifierFromFunctionImp(FunctionImp*); 49 48 49 Profiler* Profiler::s_sharedProfiler = 0; 50 Profiler* Profiler::s_sharedEnabledProfilerReference = 0; 51 50 52 Profiler* Profiler::profiler() 51 53 { 52 if (!s haredProfiler)53 s haredProfiler = new Profiler;54 return s haredProfiler;55 } 56 54 if (!s_sharedProfiler) 55 s_sharedProfiler = new Profiler(); 56 return s_sharedProfiler; 57 } 58 57 59 Profile* Profiler::findProfile(ExecState* exec, const UString& title) const 58 60 { … … 74 76 if (m_currentProfiles[i]->originatingGlobalExec() == globalExec && m_currentProfiles[i]->title() == title) 75 77 return; 76 78 s_sharedEnabledProfilerReference = this; 77 79 RefPtr<Profile> profile = Profile::create(title, globalExec, exec->lexicalGlobalObject()->pageGroupIdentifier()); 78 80 m_currentProfiles.append(profile); … … 88 90 PassRefPtr<Profile> prpProfile = m_currentProfiles[i].release(); 89 91 m_currentProfiles.remove(i); 92 if (!m_currentProfiles.size()) 93 s_sharedEnabledProfilerReference = 0; 90 94 return prpProfile; 91 95 }
Note:
See TracChangeset
for help on using the changeset viewer.