Ignore:
Timestamp:
Feb 26, 2013, 1:47:57 AM (12 years ago)
Author:
[email protected]
Message:

Kill another analyzer warning in javascriptcore
https://bugs.webkit.org/show_bug.cgi?id=110802

Reviewed by Benjamin Poulain.

Add null checks.

  • profiler/LegacyProfiler.cpp:

(JSC::LegacyProfiler::startProfiling):
(JSC::LegacyProfiler::stopProfiling):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/profiler/LegacyProfiler.cpp

    r139541 r144026  
    6464    ASSERT_ARG(title, !title.isNull());
    6565
     66    if (!exec)
     67        return;
     68
    6669    // Check if we currently have a Profile for this global ExecState and title.
    6770    // If so return early and don't create a new Profile.
    68     JSGlobalObject* origin = exec ? exec->lexicalGlobalObject() : 0;
     71    JSGlobalObject* origin = exec->lexicalGlobalObject();
    6972
    7073    for (size_t i = 0; i < m_currentProfiles.size(); ++i) {
     
    8184PassRefPtr<Profile> LegacyProfiler::stopProfiling(ExecState* exec, const String& title)
    8285{
    83     JSGlobalObject* origin = exec ? exec->lexicalGlobalObject() : 0;
     86    if (!exec)
     87        return 0;
     88
     89    JSGlobalObject* origin = exec->lexicalGlobalObject();
    8490    for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
    8591        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
Note: See TracChangeset for help on using the changeset viewer.