Ignore:
Timestamp:
May 30, 2012, 2:04:23 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 Darin Adler.

Better fix - we now never call SourceProvider::asID() if SourceProvider* is 0.

  • parser/Nodes.h:

(JSC::ScopeNode::sourceID):

  • parser/SourceCode.h:

(JSC::SourceCode::providerID):
(SourceCode):

  • parser/SourceProvider.h:

(SourceProvider):
(JSC::SourceProvider::asID):

  • runtime/Executable.h:

(JSC::ScriptExecutable::sourceID):

File:
1 edited

Legend:

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

    r118960 r118966  
    4141    class SourceProvider : public RefCounted<SourceProvider> {
    4242    public:
     43        static const intptr_t nullID = 1;
     44       
    4345        SourceProvider(const UString& url, const TextPosition& startPosition, SourceProviderCache* cache = 0)
    4446            : m_url(url)
     
    6466        intptr_t asID()
    6567        {
    66             if (!this)
    67                 return 1;
     68            ASSERT(this);
     69            if (!this) // Be defensive in release mode.
     70                return nullID;
    6871            return reinterpret_cast<intptr_t>(this);
    6972        }
Note: See TracChangeset for help on using the changeset viewer.