Changeset 36113 in webkit for trunk/JavaScriptCore/profiler/Profiler.cpp
- Timestamp:
- Sep 5, 2008, 10:52:39 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profiler.cpp
r36068 r36113 59 59 void Profiler::startProfiling(ExecState* exec, const UString& title) 60 60 { 61 ASSERT_ARG(exec, exec);62 63 61 // Check if we currently have a Profile for this global ExecState and title. 64 62 // If so return early and don't create a new Profile. 65 ExecState* globalExec = exec->lexicalGlobalObject()->globalExec(); 63 ExecState* globalExec = exec ? exec->lexicalGlobalObject()->globalExec() : 0; 64 66 65 for (size_t i = 0; i < m_currentProfiles.size(); ++i) { 67 66 ProfileGenerator* profileGenerator = m_currentProfiles[i].get(); … … 77 76 PassRefPtr<Profile> Profiler::stopProfiling(ExecState* exec, const UString& title) 78 77 { 79 ExecState* globalExec = exec ->lexicalGlobalObject()->globalExec();78 ExecState* globalExec = exec ? exec->lexicalGlobalObject()->globalExec() : 0; 80 79 for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) { 81 80 ProfileGenerator* profileGenerator = m_currentProfiles[i].get(); … … 98 97 { 99 98 for (size_t i = 0; i < profiles.size(); ++i) { 100 if (profiles[i]->profileGroup() == currentProfileTargetGroup )99 if (profiles[i]->profileGroup() == currentProfileTargetGroup || !profiles[i]->originatingGlobalExec()) 101 100 (profiles[i].get()->*function)(callIdentifier); 102 101 }
Note:
See TracChangeset
for help on using the changeset viewer.