Changeset 158862 in webkit


Ignore:
Timestamp:
Nov 7, 2013 12:17:13 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
https://bugs.webkit.org/show_bug.cgi?id=123945.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::sourceID):
(JSC::DebuggerCallFrame::sourceIDForCallFrame):

  • debugger/DebuggerCallFrame.h:

Source/WebCore:

No new tests.

  • bindings/js/JSInjectedScriptHostCustom.cpp:

(WebCore::JSInjectedScriptHost::functionDetails):

  • bindings/js/JavaScriptCallFrame.h:

(WebCore::JavaScriptCallFrame::sourceID):

  • bindings/js/ScriptDebugServer.cpp:

(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::pauseIfNeeded):

  • bindings/js/ScriptDebugServer.h:
  • inspector/InspectorConsoleAgent.cpp:

(WebCore::InspectorConsoleAgent::addMessageToConsole):

  • inspector/InspectorConsoleAgent.h:
  • inspector/InspectorConsoleInstrumentation.h:

(WebCore::InspectorInstrumentation::addMessageToConsole):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):

  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::compileScript):
(WebCore::InspectorDebuggerAgent::runScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::clear):
(WebCore::InspectorDebuggerAgent::reset):

  • inspector/InspectorDebuggerAgent.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):

  • inspector/InspectorInstrumentation.h:
  • inspector/ScriptDebugListener.h:

Source/WebKit/mac:

  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::exception):

Location:
trunk/Source
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r158858 r158862  
     12013-11-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
     4        https://bugs.webkit.org/show_bug.cgi?id=123945.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * debugger/DebuggerCallFrame.cpp:
     9        (JSC::DebuggerCallFrame::sourceID):
     10        (JSC::DebuggerCallFrame::sourceIDForCallFrame):
     11        * debugger/DebuggerCallFrame.h:
     12
    1132013-11-07  Michael Saboff  <msaboff@apple.com>
    214
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r158586 r158862  
    8686}
    8787
    88 intptr_t DebuggerCallFrame::sourceId() const
    89 {
    90     ASSERT(isValid());
    91     if (!isValid())
    92         return 0;
    93     return sourceIdForCallFrame(m_callFrame);
     88intptr_t DebuggerCallFrame::sourceID() const
     89{
     90    ASSERT(isValid());
     91    if (!isValid())
     92        return 0;
     93    return sourceIDForCallFrame(m_callFrame);
    9494}
    9595
     
    186186}
    187187
    188 intptr_t DebuggerCallFrame::sourceIdForCallFrame(CallFrame* callFrame)
     188intptr_t DebuggerCallFrame::sourceIDForCallFrame(CallFrame* callFrame)
    189189{
    190190    ASSERT(callFrame);
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.h

    r156936 r158862  
    5151    JS_EXPORT_PRIVATE PassRefPtr<DebuggerCallFrame> callerFrame();
    5252    ExecState* exec() const { return m_callFrame; }
    53     JS_EXPORT_PRIVATE intptr_t sourceId() const;
     53    JS_EXPORT_PRIVATE intptr_t sourceID() const;
    5454
    5555    // line and column are in base 0 e.g. the first line is line 0.
     
    7373    JS_EXPORT_PRIVATE static JSValue evaluateWithCallFrame(CallFrame*, const String& script, JSValue& exception);
    7474    JS_EXPORT_PRIVATE static TextPosition positionForCallFrame(CallFrame*);
    75     JS_EXPORT_PRIVATE static intptr_t sourceIdForCallFrame(CallFrame*);
     75    JS_EXPORT_PRIVATE static intptr_t sourceIDForCallFrame(CallFrame*);
    7676    static JSValue thisValueForCallFrame(CallFrame*);
    7777
  • trunk/Source/WebCore/ChangeLog

    r158861 r158862  
     12013-11-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
     4        https://bugs.webkit.org/show_bug.cgi?id=123945.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        No new tests.
     9
     10        * bindings/js/JSInjectedScriptHostCustom.cpp:
     11        (WebCore::JSInjectedScriptHost::functionDetails):
     12        * bindings/js/JavaScriptCallFrame.h:
     13        (WebCore::JavaScriptCallFrame::sourceID):
     14        * bindings/js/ScriptDebugServer.cpp:
     15        (WebCore::ScriptDebugServer::ScriptDebugServer):
     16        (WebCore::ScriptDebugServer::setBreakpoint):
     17        (WebCore::ScriptDebugServer::removeBreakpoint):
     18        (WebCore::ScriptDebugServer::hasBreakpoint):
     19        (WebCore::ScriptDebugServer::clearBreakpoints):
     20        (WebCore::ScriptDebugServer::updateCallFrame):
     21        (WebCore::ScriptDebugServer::pauseIfNeeded):
     22        * bindings/js/ScriptDebugServer.h:
     23        * inspector/InspectorConsoleAgent.cpp:
     24        (WebCore::InspectorConsoleAgent::addMessageToConsole):
     25        * inspector/InspectorConsoleAgent.h:
     26        * inspector/InspectorConsoleInstrumentation.h:
     27        (WebCore::InspectorInstrumentation::addMessageToConsole):
     28        * inspector/InspectorDOMAgent.cpp:
     29        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
     30        * inspector/InspectorDebuggerAgent.cpp:
     31        (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
     32        (WebCore::parseLocation):
     33        (WebCore::InspectorDebuggerAgent::setBreakpoint):
     34        (WebCore::InspectorDebuggerAgent::removeBreakpoint):
     35        (WebCore::InspectorDebuggerAgent::continueToLocation):
     36        (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
     37        (WebCore::InspectorDebuggerAgent::searchInContent):
     38        (WebCore::InspectorDebuggerAgent::setScriptSource):
     39        (WebCore::InspectorDebuggerAgent::getScriptSource):
     40        (WebCore::InspectorDebuggerAgent::compileScript):
     41        (WebCore::InspectorDebuggerAgent::runScript):
     42        (WebCore::InspectorDebuggerAgent::didParseSource):
     43        (WebCore::InspectorDebuggerAgent::didPause):
     44        (WebCore::InspectorDebuggerAgent::clear):
     45        (WebCore::InspectorDebuggerAgent::reset):
     46        * inspector/InspectorDebuggerAgent.h:
     47        * inspector/InspectorInstrumentation.cpp:
     48        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
     49        * inspector/InspectorInstrumentation.h:
     50        * inspector/ScriptDebugListener.h:
     51
    1522013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
    253
  • trunk/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp

    r157215 r158862  
    170170    if (lineNumber)
    171171        lineNumber -= 1; // In the inspector protocol all positions are 0-based while in SourceCode they are 1-based
    172     String scriptId = String::number(sourceCode->provider()->asID());
     172    String scriptID = String::number(sourceCode->provider()->asID());
    173173
    174174    JSObject* location = constructEmptyObject(exec);
    175175    location->putDirect(exec->vm(), Identifier(exec, "lineNumber"), jsNumber(lineNumber));
    176     location->putDirect(exec->vm(), Identifier(exec, "scriptId"), jsString(exec, scriptId));
     176    location->putDirect(exec->vm(), Identifier(exec, "scriptId"), jsString(exec, scriptID));
    177177
    178178    JSObject* result = constructEmptyObject(exec);
  • trunk/Source/WebCore/bindings/js/JavaScriptCallFrame.h

    r156936 r158862  
    4646
    4747    JavaScriptCallFrame* caller();
    48     intptr_t sourceID() const { return m_debuggerCallFrame->sourceId(); }
     48    intptr_t sourceID() const { return m_debuggerCallFrame->sourceID(); }
    4949    const TextPosition position() const { return m_debuggerCallFrame->position(); }
    5050    int line() const { return m_debuggerCallFrame->line(); }
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp

    r158586 r158862  
    8989    , m_recompileTimer(this, &ScriptDebugServer::recompileAllJSFunctions)
    9090    , m_lastExecutedLine(-1)
    91     , m_lastExecutedSourceId(-1)
     91    , m_lastExecutedSourceID(-1)
    9292{
    9393}
     
    102102    if (!sourceIDValue)
    103103        return "";
    104     SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
    105     if (it == m_sourceIdToBreakpoints.end())
    106         it = m_sourceIdToBreakpoints.set(sourceIDValue, LineToBreakpointsMap()).iterator;
     104    SourceIDToBreakpointsMap::iterator it = m_sourceIDToBreakpoints.find(sourceIDValue);
     105    if (it == m_sourceIDToBreakpoints.end())
     106        it = m_sourceIDToBreakpoints.set(sourceIDValue, LineToBreakpointsMap()).iterator;
    107107    LineToBreakpointsMap::iterator breaksIt = it->value.find(scriptBreakpoint.lineNumber);
    108108    if (breaksIt == it->value.end())
     
    123123}
    124124
    125 void ScriptDebugServer::removeBreakpoint(const String& breakpointId)
     125void ScriptDebugServer::removeBreakpoint(const String& breakpointID)
    126126{
    127127    Vector<String> tokens;
    128     breakpointId.split(":", tokens);
     128    breakpointID.split(":", tokens);
    129129    if (tokens.size() != 3)
    130130        return;
     
    140140        return;
    141141
    142     SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
    143     if (it == m_sourceIdToBreakpoints.end())
     142    SourceIDToBreakpointsMap::iterator it = m_sourceIDToBreakpoints.find(sourceIDValue);
     143    if (it == m_sourceIDToBreakpoints.end())
    144144        return;
    145145    LineToBreakpointsMap::iterator breaksIt = it->value.find(lineNumber);
     
    163163        return false;
    164164
    165     SourceIdToBreakpointsMap::const_iterator it = m_sourceIdToBreakpoints.find(sourceID);
    166     if (it == m_sourceIdToBreakpoints.end())
     165    SourceIDToBreakpointsMap::const_iterator it = m_sourceIDToBreakpoints.find(sourceID);
     166    if (it == m_sourceIDToBreakpoints.end())
    167167        return false;
    168168
     
    247247void ScriptDebugServer::clearBreakpoints()
    248248{
    249     m_sourceIdToBreakpoints.clear();
     249    m_sourceIDToBreakpoints.clear();
    250250    updateNumberOfBreakpoints(0);
    251251}
     
    479479{
    480480    m_currentCallFrame = callFrame;
    481     intptr_t sourceId = DebuggerCallFrame::sourceIdForCallFrame(callFrame);
    482     if (m_lastExecutedSourceId != sourceId) {
     481    intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(callFrame);
     482    if (m_lastExecutedSourceID != sourceID) {
    483483        m_lastExecutedLine = -1;
    484         m_lastExecutedSourceId = sourceId;
     484        m_lastExecutedSourceID = sourceID;
    485485    }
    486486}
     
    508508    pauseNow |= (m_pauseOnCallFrame == m_currentCallFrame);
    509509
    510     intptr_t sourceId = DebuggerCallFrame::sourceIdForCallFrame(m_currentCallFrame);
     510    intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(m_currentCallFrame);
    511511    TextPosition position = DebuggerCallFrame::positionForCallFrame(m_currentCallFrame);
    512     pauseNow |= didHitBreakpoint = hasBreakpoint(sourceId, position, &breakpoint);
     512    pauseNow |= didHitBreakpoint = hasBreakpoint(sourceID, position, &breakpoint);
    513513    m_lastExecutedLine = position.m_line.zeroBasedInt();
    514514    if (!pauseNow)
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.h

    r157653 r158862  
    5959public:
    6060    String setBreakpoint(const String& sourceID, const ScriptBreakpoint&, int* actualLineNumber, int* actualColumnNumber);
    61     void removeBreakpoint(const String& breakpointId);
     61    void removeBreakpoint(const String& breakpointID);
    6262    void clearBreakpoints();
    6363    void setBreakpointsActivated(bool activated);
     
    9898    bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; }
    9999
    100     void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptId, String* exceptionMessage);
     100    void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptID, String* exceptionMessage);
    101101    void clearCompiledScripts();
    102     void runScript(JSC::ExecState*, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage);
     102    void runScript(JSC::ExecState*, const String& scriptID, ScriptValue* result, bool* wasThrown, String* exceptionMessage);
    103103
    104104    class Task {
     
    159159    typedef Vector<ScriptBreakpoint> BreakpointsInLine;
    160160    typedef HashMap<int, BreakpointsInLine, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int>> LineToBreakpointsMap;
    161     typedef HashMap<intptr_t, LineToBreakpointsMap> SourceIdToBreakpointsMap;
     161    typedef HashMap<intptr_t, LineToBreakpointsMap> SourceIDToBreakpointsMap;
    162162
    163163    bool m_callingListeners;
     
    171171    JSC::CallFrame* m_currentCallFrame;
    172172    RefPtr<JSC::DebuggerCallFrame> m_currentDebuggerCallFrame;
    173     SourceIdToBreakpointsMap m_sourceIdToBreakpoints;
     173    SourceIDToBreakpointsMap m_sourceIDToBreakpoints;
    174174    Timer<ScriptDebugServer> m_recompileTimer;
    175175
    176176    int m_lastExecutedLine;
    177     intptr_t m_lastExecutedSourceId;
     177    intptr_t m_lastExecutedSourceID;
    178178
    179179    friend class DebuggerCallFrameScope;
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp

    r158421 r158862  
    162162}
    163163
    164 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
     164void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    165165{
    166166    if (!developerExtrasEnabled())
     
    173173
    174174    bool canGenerateCallStack = !isWorkerAgent() && m_frontend;
    175     addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier)));
     175    addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier)));
    176176}
    177177
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.h

    r158421 r158862  
    7070
    7171    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    72     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
     72    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    7373
    7474    // FIXME: Remove once we no longer generate stacks outside of Inspector.
  • trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h

    r155736 r158862  
    7373}
    7474
    75 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    76 {
    77 #if ENABLE(INSPECTOR)
    78     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
    79         addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
    80 #else
    81     UNUSED_PARAM(page);
    82     UNUSED_PARAM(source);
    83     UNUSED_PARAM(type);
    84     UNUSED_PARAM(level);
    85     UNUSED_PARAM(message);
    86     UNUSED_PARAM(scriptId);
     75inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
     76{
     77#if ENABLE(INSPECTOR)
     78    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
     79        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
     80#else
     81    UNUSED_PARAM(page);
     82    UNUSED_PARAM(source);
     83    UNUSED_PARAM(type);
     84    UNUSED_PARAM(level);
     85    UNUSED_PARAM(message);
     86    UNUSED_PARAM(scriptID);
    8787    UNUSED_PARAM(lineNumber);
    8888    UNUSED_PARAM(state);
     
    108108}
    109109
    110 inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
     110inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    111111{
    112112#if ENABLE(INSPECTOR)
    113113    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope))
    114         addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
     114        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
    115115#else
    116116    UNUSED_PARAM(workerGlobalScope);
     
    119119    UNUSED_PARAM(level);
    120120    UNUSED_PARAM(message);
    121     UNUSED_PARAM(scriptId);
     121    UNUSED_PARAM(scriptID);
    122122    UNUSED_PARAM(lineNumber);
    123123    UNUSED_PARAM(columnNumber);
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r158415 r158862  
    14791479    String body;
    14801480    int lineNumber = 0;
    1481     String scriptId;
     1481    String scriptID;
    14821482    String sourceName;
    14831483    if (auto scriptListener = JSEventListener::cast(eventListener.get())) {
     
    14911491                    if (auto executable = function->jsExecutable()) {
    14921492                        lineNumber = executable->lineNo() - 1;
    1493                         scriptId = executable->sourceID() == JSC::SourceProvider::nullID ? emptyString() : String::number(executable->sourceID());
     1493                        scriptID = executable->sourceID() == JSC::SourceProvider::nullID ? emptyString() : String::number(executable->sourceID());
    14941494                        sourceName = executable->sourceURL();
    14951495                    }
     
    15101510            value->setHandler(injectedScript.wrapObject(ScriptValue(state->vm(), handler), *objectGroupId));
    15111511    }
    1512     if (!scriptId.isNull()) {
     1512    if (!scriptID.isNull()) {
    15131513        RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Location::create()
    1514             .setScriptId(scriptId)
     1514            .setScriptId(scriptID)
    15151515            .setLineNumber(lineNumber);
    15161516        value->setLocation(location.release());
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r158421 r158862  
    257257}
    258258
    259 void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location>>& locations)
     259void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location>>& locations)
    260260{
    261261    locations = Array<TypeBuilder::Debugger::Location>::create();
     
    269269    bool isRegex = optionalURLRegex;
    270270
    271     String breakpointId = (isRegex ? "/" + url + "/" : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
    272     if (m_javaScriptBreakpoints.contains(breakpointId)) {
     271    String breakpointIdentifier = (isRegex ? "/" + url + "/" : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
     272    if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) {
    273273        *errorString = "Breakpoint at specified location already exists.";
    274274        return;
     
    288288        return;
    289289
    290     m_javaScriptBreakpoints.set(breakpointId, buildObjectForBreakpointCookie(url, lineNumber, columnNumber, condition, actions, isRegex, autoContinue));
     290    m_javaScriptBreakpoints.set(breakpointIdentifier, buildObjectForBreakpointCookie(url, lineNumber, columnNumber, condition, actions, isRegex, autoContinue));
    291291
    292292    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
     
    296296            continue;
    297297
    298         RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(breakpointId, it->key, breakpoint);
     298        RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(breakpointIdentifier, it->key, breakpoint);
    299299        if (location)
    300300            locations->addItem(location);
    301301    }
    302     *outBreakpointId = breakpointId;
    303 }
    304 
    305 static bool parseLocation(ErrorString* errorString, RefPtr<InspectorObject> location, String* scriptId, int* lineNumber, int* columnNumber)
    306 {
    307     if (!location->getString("scriptId", scriptId) || !location->getNumber("lineNumber", lineNumber)) {
     302    *outBreakpointIdentifier = breakpointIdentifier;
     303}
     304
     305static bool parseLocation(ErrorString* errorString, RefPtr<InspectorObject> location, String* scriptID, int* lineNumber, int* columnNumber)
     306{
     307    if (!location->getString("scriptId", scriptID) || !location->getNumber("lineNumber", lineNumber)) {
    308308        // FIXME: replace with input validation.
    309309        *errorString = "scriptId and lineNumber are required.";
     
    315315}
    316316
    317 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefPtr<TypeBuilder::Debugger::Location>& actualLocation)
    318 {
    319     String scriptId;
     317void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<TypeBuilder::Debugger::Location>& actualLocation)
     318{
     319    String scriptID;
    320320    int lineNumber;
    321321    int columnNumber;
    322322
    323     if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNumber))
     323    if (!parseLocation(errorString, location, &scriptID, &lineNumber, &columnNumber))
    324324        return;
    325325
     
    337337        return;
    338338
    339     String breakpointId = scriptId + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
    340     if (m_breakpointIdToDebugServerBreakpointIds.find(breakpointId) != m_breakpointIdToDebugServerBreakpointIds.end()) {
     339    String breakpointIdentifier = scriptID + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
     340    if (m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier) != m_breakpointIdentifierToDebugServerBreakpointIDs.end()) {
    341341        *errorString = "Breakpoint at specified location already exists.";
    342342        return;
    343343    }
    344344    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
    345     actualLocation = resolveBreakpoint(breakpointId, scriptId, breakpoint);
     345    actualLocation = resolveBreakpoint(breakpointIdentifier, scriptID, breakpoint);
    346346    if (actualLocation)
    347         *outBreakpointId = breakpointId;
     347        *outBreakpointIdentifier = breakpointIdentifier;
    348348    else
    349349        *errorString = "Could not resolve breakpoint";
    350350}
    351351
    352 void InspectorDebuggerAgent::removeBreakpoint(ErrorString*, const String& breakpointId)
    353 {
    354     m_javaScriptBreakpoints.remove(breakpointId);
    355 
    356     BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
    357     if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpointIds.end())
    358         return;
    359     for (size_t i = 0; i < debugServerBreakpointIdsIterator->value.size(); ++i)
    360         scriptDebugServer().removeBreakpoint(debugServerBreakpointIdsIterator->value[i]);
    361     m_breakpointIdToDebugServerBreakpointIds.remove(debugServerBreakpointIdsIterator);
     352void InspectorDebuggerAgent::removeBreakpoint(ErrorString*, const String& breakpointIdentifier)
     353{
     354    m_javaScriptBreakpoints.remove(breakpointIdentifier);
     355
     356    BreakpointIdentifierToDebugServerBreakpointIDsMap::iterator debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier);
     357    if (debugServerBreakpointIDsIterator == m_breakpointIdentifierToDebugServerBreakpointIDs.end())
     358        return;
     359    for (size_t i = 0; i < debugServerBreakpointIDsIterator->value.size(); ++i)
     360        scriptDebugServer().removeBreakpoint(debugServerBreakpointIDsIterator->value[i]);
     361    m_breakpointIdentifierToDebugServerBreakpointIDs.remove(debugServerBreakpointIDsIterator);
    362362}
    363363
    364364void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const RefPtr<InspectorObject>& location)
    365365{
    366     if (!m_continueToLocationBreakpointId.isEmpty()) {
    367         scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointId);
    368         m_continueToLocationBreakpointId = "";
    369     }
    370 
    371     String scriptId;
     366    if (!m_continueToLocationBreakpointID.isEmpty()) {
     367        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
     368        m_continueToLocationBreakpointID = "";
     369    }
     370
     371    String scriptID;
    372372    int lineNumber;
    373373    int columnNumber;
    374374
    375     if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNumber))
     375    if (!parseLocation(errorString, location, &scriptID, &lineNumber, &columnNumber))
    376376        return;
    377377
    378378    ScriptBreakpoint breakpoint(lineNumber, columnNumber, "", false);
    379     m_continueToLocationBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &lineNumber, &columnNumber);
     379    m_continueToLocationBreakpointID = scriptDebugServer().setBreakpoint(scriptID, breakpoint, &lineNumber, &columnNumber);
    380380    resume(errorString);
    381381}
    382382
    383 PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint)
    384 {
    385     ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId);
     383PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointIdentifier, const String& scriptID, const ScriptBreakpoint& breakpoint)
     384{
     385    ScriptsMap::iterator scriptIterator = m_scripts.find(scriptID);
    386386    if (scriptIterator == m_scripts.end())
    387387        return 0;
     
    392392    int actualLineNumber;
    393393    int actualColumnNumber;
    394     String debugServerBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &actualLineNumber, &actualColumnNumber);
    395     if (debugServerBreakpointId.isEmpty())
     394    String debugServerBreakpointID = scriptDebugServer().setBreakpoint(scriptID, breakpoint, &actualLineNumber, &actualColumnNumber);
     395    if (debugServerBreakpointID.isEmpty())
    396396        return 0;
    397397
    398     BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
    399     if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpointIds.end())
    400         debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.set(breakpointId, Vector<String>()).iterator;
    401     debugServerBreakpointIdsIterator->value.append(debugServerBreakpointId);
     398    BreakpointIdentifierToDebugServerBreakpointIDsMap::iterator debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier);
     399    if (debugServerBreakpointIDsIterator == m_breakpointIdentifierToDebugServerBreakpointIDs.end())
     400        debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.set(breakpointIdentifier, Vector<String>()).iterator;
     401    debugServerBreakpointIDsIterator->value.append(debugServerBreakpointID);
    402402
    403403    RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Location::create()
    404         .setScriptId(scriptId)
     404        .setScriptId(scriptID)
    405405        .setLineNumber(actualLineNumber);
    406406    location->setColumnNumber(actualColumnNumber);
     
    418418}
    419419
    420 void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptId, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<WebCore::TypeBuilder::Page::SearchMatch>>& results)
     420void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptID, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<WebCore::TypeBuilder::Page::SearchMatch>>& results)
    421421{
    422422    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
    423423    bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
    424424
    425     ScriptsMap::iterator it = m_scripts.find(scriptId);
     425    ScriptsMap::iterator it = m_scripts.find(scriptID);
    426426    if (it != m_scripts.end())
    427427        results = ContentSearchUtils::searchInTextByLines(it->value.source, query, caseSensitive, isRegex);
    428428    else
    429         *error = "No script for id: " + scriptId;
    430 }
    431 
    432 void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
     429        *error = "No script for id: " + scriptID;
     430}
     431
     432void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptID, const String& newContent, const bool* const preview, RefPtr<Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
    433433{
    434434    bool previewOnly = preview && *preview;
    435435    ScriptObject resultObject;
    436     if (!scriptDebugServer().setScriptSource(scriptId, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
     436    if (!scriptDebugServer().setScriptSource(scriptID, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
    437437        return;
    438438    newCallFrames = currentCallFrames();
     
    442442}
    443443
    444 void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String& scriptId, String* scriptSource)
    445 {
    446     ScriptsMap::iterator it = m_scripts.find(scriptId);
     444void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String& scriptID, String* scriptSource)
     445{
     446    ScriptsMap::iterator it = m_scripts.find(scriptID);
    447447    if (it != m_scripts.end())
    448448        *scriptSource = it->value.source;
    449449    else
    450         *error = "No script for id: " + scriptId;
     450        *error = "No script for id: " + scriptID;
    451451}
    452452
     
    567567}
    568568
    569 void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<ScriptId>* scriptId, TypeBuilder::OptOutput<String>* syntaxErrorMessage)
     569void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<ScriptId>* scriptID, TypeBuilder::OptOutput<String>* syntaxErrorMessage)
    570570{
    571571    InjectedScript injectedScript = injectedScriptForEval(errorString, 0);
     
    575575    }
    576576
    577     String scriptIdValue;
     577    String scriptIDValue;
    578578    String exceptionMessage;
    579     scriptDebugServer().compileScript(injectedScript.scriptState(), expression, sourceURL, &scriptIdValue, &exceptionMessage);
    580     if (!scriptIdValue && !exceptionMessage) {
     579    scriptDebugServer().compileScript(injectedScript.scriptState(), expression, sourceURL, &scriptIDValue, &exceptionMessage);
     580    if (!scriptIDValue && !exceptionMessage) {
    581581        *errorString = "Script compilation failed";
    582582        return;
    583583    }
    584584    *syntaxErrorMessage = exceptionMessage;
    585     *scriptId = scriptIdValue;
    586 }
    587 
    588 void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptId, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
     585    *scriptID = scriptIDValue;
     586}
     587
     588void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptID, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
    589589{
    590590    InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
     
    604604    bool wasThrownValue;
    605605    String exceptionMessage;
    606     scriptDebugServer().runScript(injectedScript.scriptState(), scriptId, &value, &wasThrownValue, &exceptionMessage);
     606    scriptDebugServer().runScript(injectedScript.scriptState(), scriptID, &value, &wasThrownValue, &exceptionMessage);
    607607    *wasThrown = wasThrownValue;
    608608    if (value.hasNoValue()) {
     
    671671// JavaScriptDebugListener functions
    672672
    673 void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script& inScript)
     673void InspectorDebuggerAgent::didParseSource(const String& scriptID, const Script& inScript)
    674674{
    675675    Script script = inScript;
     
    683683    String* sourceMapURLParam = script.sourceMappingURL.isNull() ? 0 : &script.sourceMappingURL;
    684684    const bool* isContentScript = script.isContentScript ? &script.isContentScript : 0;
    685     m_frontend->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
    686 
    687     m_scripts.set(scriptId, script);
     685    m_frontend->scriptParsed(scriptID, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
     686
     687    m_scripts.set(scriptID, script);
    688688
    689689    if (scriptURL.isEmpty())
     
    710710        }
    711711
    712         RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->key, scriptId, breakpoint);
     712        RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->key, scriptID, breakpoint);
    713713        if (location)
    714714            m_frontend->breakpointResolved(it->key, location);
     
    739739    m_javaScriptPauseScheduled = false;
    740740
    741     if (!m_continueToLocationBreakpointId.isEmpty()) {
    742         scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointId);
    743         m_continueToLocationBreakpointId = "";
     741    if (!m_continueToLocationBreakpointID.isEmpty()) {
     742        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
     743        m_continueToLocationBreakpointID = "";
    744744    }
    745745    if (m_listener)
     
    767767    m_currentCallStack = ScriptValue();
    768768    m_scripts.clear();
    769     m_breakpointIdToDebugServerBreakpointIds.clear();
    770     m_continueToLocationBreakpointId = String();
     769    m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
     770    m_continueToLocationBreakpointID = String();
    771771    clearBreakDetails();
    772772    m_javaScriptPauseScheduled = false;
     
    794794    scriptDebugServer().clearBreakpoints();
    795795    m_scripts.clear();
    796     m_breakpointIdToDebugServerBreakpointIds.clear();
     796    m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
    797797    if (m_frontend)
    798798        m_frontend->globalObjectCleared();
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r158421 r158862  
    8585    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location>>& locations);
    8686    virtual void setBreakpoint(ErrorString*, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Debugger::Location>& actualLocation);
    87     virtual void removeBreakpoint(ErrorString*, const String& breakpointId);
     87    virtual void removeBreakpoint(ErrorString*, const String& breakpointIdentifier);
    8888    virtual void continueToLocation(ErrorString*, const RefPtr<InspectorObject>& location);
    8989
    90     virtual void searchInContent(ErrorString*, const String& scriptId, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>>&);
    91     virtual void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result);
    92     virtual void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource);
     90    virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>>&);
     91    virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result);
     92    virtual void getScriptSource(ErrorString*, const String& scriptID, String* scriptSource);
    9393    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>&);
    9494    virtual void pause(ErrorString*);
     
    150150    PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>> currentCallFrames();
    151151
    152     virtual void didParseSource(const String& scriptId, const Script&) OVERRIDE FINAL;
     152    virtual void didParseSource(const String& scriptID, const Script&) OVERRIDE FINAL;
    153153    virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) OVERRIDE FINAL;
    154154
    155155    void setPauseOnExceptionsImpl(ErrorString*, int);
    156156
    157     PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&);
     157    PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String& breakpointIdentifier, const String& scriptID, const ScriptBreakpoint&);
    158158    void clear();
    159159    bool assertPaused(ErrorString*);
     
    163163
    164164    typedef HashMap<String, Script> ScriptsMap;
    165     typedef HashMap<String, Vector<String>> BreakpointIdToDebugServerBreakpointIdsMap;
    166     typedef HashMap<String, RefPtr<InspectorObject>> BreakpointIdToBreakpointMap;
     165    typedef HashMap<String, Vector<String>> BreakpointIdentifierToDebugServerBreakpointIDsMap;
     166    typedef HashMap<String, RefPtr<InspectorObject>> BreakpointIdentifierToBreakpointMap;
    167167
    168168    InjectedScriptManager* m_injectedScriptManager;
     
    171171    ScriptValue m_currentCallStack;
    172172    ScriptsMap m_scripts;
    173     BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpointIds;
    174     BreakpointIdToBreakpointMap m_javaScriptBreakpoints;
    175     String m_continueToLocationBreakpointId;
     173    BreakpointIdentifierToDebugServerBreakpointIDsMap m_breakpointIdentifierToDebugServerBreakpointIDs;
     174    BreakpointIdentifierToBreakpointMap m_javaScriptBreakpoints;
     175    String m_continueToLocationBreakpointID;
    176176    InspectorFrontend::Debugger::Reason::Enum m_breakReason;
    177177    RefPtr<InspectorObject> m_breakAuxData;
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r158159 r158862  
    10331033}
    10341034
    1035 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
     1035void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    10361036{
    10371037    if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
    1038         consoleAgent->addMessageToConsole(source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
     1038        consoleAgent->addMessageToConsole(source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
    10391039}
    10401040
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r158708 r158862  
    233233    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    234234    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    235     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
     235    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    236236#if ENABLE(WORKERS)
    237237    // FIXME: Convert to ScriptArguments to match non-worker context.
    238238    static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    239     static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
     239    static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    240240#endif
    241241    static void consoleCount(Page*, JSC::ExecState*, PassRefPtr<ScriptArguments>);
     
    437437
    438438    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
    439     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
     439    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
    440440
    441441    // FIXME: Remove once we no longer generate stacks outside of Inspector.
  • trunk/Source/WebCore/inspector/ScriptDebugListener.h

    r157939 r158862  
    6666    virtual ~ScriptDebugListener() { }
    6767
    68     virtual void didParseSource(const String& scriptId, const Script&) = 0;
     68    virtual void didParseSource(const String& scriptID, const Script&) = 0;
    6969    virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) = 0;
    7070    virtual void didPause(JSC::ExecState*, const ScriptValue& callFrames, const ScriptValue& exception) = 0;
  • trunk/Source/WebKit/mac/ChangeLog

    r158803 r158862  
     12013-11-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
     4        https://bugs.webkit.org/show_bug.cgi?id=123945.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * WebView/WebScriptDebugger.mm:
     9        (WebScriptDebugger::exception):
     10
    1112013-11-06  Daniel Bates  <dabates@apple.com>
    212
  • trunk/Source/WebKit/mac/WebView/WebScriptDebugger.mm

    r157746 r158862  
    134134    if (cache->exceptionWasRaisedFunc) {
    135135        if (cache->exceptionWasRaisedExpectsHasHandlerFlag)
    136             CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:hasHandler:sourceId:line:forWebFrame:), webCallFrame.get(), hasHandler, debuggerCallFrame->sourceId(), debuggerCallFrame->line(), webFrame);
     136            CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:hasHandler:sourceId:line:forWebFrame:), webCallFrame.get(), hasHandler, debuggerCallFrame->sourceID(), debuggerCallFrame->line(), webFrame);
    137137        else
    138             CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:), webCallFrame.get(), debuggerCallFrame->sourceId(), debuggerCallFrame->line(), webFrame);
     138            CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:), webCallFrame.get(), debuggerCallFrame->sourceID(), debuggerCallFrame->line(), webFrame);
    139139    }
    140140
Note: See TracChangeset for help on using the changeset viewer.