Changeset 118960 in webkit for trunk/Source/JavaScriptCore/parser


Ignore:
Timestamp:
May 30, 2012, 1:18:00 PM (13 years ago)
Author:
[email protected]
Message:

ScriptDebugServer wants sourceIDs that are non-zero because that's what HashMaps want, so JSC should placate it
https://bugs.webkit.org/show_bug.cgi?id=87887

Reviewed by Geoffrey Garen.

  • parser/SourceProvider.h:

(JSC::SourceProvider::asID):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SourceProvider.h

    r111358 r118960  
    6262        const UString& url() { return m_url; }
    6363        TextPosition startPosition() const { return m_startPosition; }
    64         intptr_t asID() { return reinterpret_cast<intptr_t>(this); }
     64        intptr_t asID()
     65        {
     66            if (!this)
     67                return 1;
     68            return reinterpret_cast<intptr_t>(this);
     69        }
    6570
    6671        bool isValid() const { return m_validated; }
Note: See TracChangeset for help on using the changeset viewer.