Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and Breakpoin…
…tId.

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):



Canonical link: https://commits.webkit.org/142174@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Mark Lam committed Nov 7, 2013
1 parent 51d9da6 commit a1fdd1e
Show file tree
Hide file tree
Showing 19 changed files with 197 additions and 124 deletions.
12 changes: 12 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
2013-11-07 Mark Lam <mark.lam@apple.com>

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

Reviewed by Geoffrey Garen.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceID):
(JSC::DebuggerCallFrame::sourceIDForCallFrame):
* debugger/DebuggerCallFrame.h:

2013-11-07 Michael Saboff <msaboff@apple.com>

returnFromJavaScript() for ARM_THUMB2 uses push()s which should be pop()s
Expand Down
6 changes: 3 additions & 3 deletions Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
Expand Up @@ -85,12 +85,12 @@ JSC::JSGlobalObject* DebuggerCallFrame::dynamicGlobalObject() const
return m_callFrame->dynamicGlobalObject();
}

intptr_t DebuggerCallFrame::sourceId() const
intptr_t DebuggerCallFrame::sourceID() const
{
ASSERT(isValid());
if (!isValid())
return 0;
return sourceIdForCallFrame(m_callFrame);
return sourceIDForCallFrame(m_callFrame);
}

String DebuggerCallFrame::functionName() const
Expand Down Expand Up @@ -185,7 +185,7 @@ TextPosition DebuggerCallFrame::positionForCallFrame(CallFrame* callFrame)
return TextPosition(OrdinalNumber::fromOneBasedInt(functor.line()), OrdinalNumber::fromOneBasedInt(functor.column()));
}

intptr_t DebuggerCallFrame::sourceIdForCallFrame(CallFrame* callFrame)
intptr_t DebuggerCallFrame::sourceIDForCallFrame(CallFrame* callFrame)
{
ASSERT(callFrame);
CodeBlock* codeBlock = callFrame->codeBlock();
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/debugger/DebuggerCallFrame.h
Expand Up @@ -50,7 +50,7 @@ class DebuggerCallFrame : public RefCounted<DebuggerCallFrame> {
CallFrame* callFrame() const { return m_callFrame; }
JS_EXPORT_PRIVATE PassRefPtr<DebuggerCallFrame> callerFrame();
ExecState* exec() const { return m_callFrame; }
JS_EXPORT_PRIVATE intptr_t sourceId() const;
JS_EXPORT_PRIVATE intptr_t sourceID() const;

// line and column are in base 0 e.g. the first line is line 0.
int line() const { return m_position.m_line.zeroBasedInt(); }
Expand All @@ -72,7 +72,7 @@ class DebuggerCallFrame : public RefCounted<DebuggerCallFrame> {

JS_EXPORT_PRIVATE static JSValue evaluateWithCallFrame(CallFrame*, const String& script, JSValue& exception);
JS_EXPORT_PRIVATE static TextPosition positionForCallFrame(CallFrame*);
JS_EXPORT_PRIVATE static intptr_t sourceIdForCallFrame(CallFrame*);
JS_EXPORT_PRIVATE static intptr_t sourceIDForCallFrame(CallFrame*);
static JSValue thisValueForCallFrame(CallFrame*);

private:
Expand Down
51 changes: 51 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,54 @@
2013-11-07 Mark Lam <mark.lam@apple.com>

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

Reviewed by Geoffrey Garen.

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:

2013-11-07 Cidorvan Leite <cidorvan.leite@openbossa.org>

Avoid invalid cairo matrix when drawing surfaces too small
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
Expand Up @@ -169,11 +169,11 @@ JSValue JSInjectedScriptHost::functionDetails(ExecState* exec)
int lineNumber = sourceCode->firstLine();
if (lineNumber)
lineNumber -= 1; // In the inspector protocol all positions are 0-based while in SourceCode they are 1-based
String scriptId = String::number(sourceCode->provider()->asID());
String scriptID = String::number(sourceCode->provider()->asID());

JSObject* location = constructEmptyObject(exec);
location->putDirect(exec->vm(), Identifier(exec, "lineNumber"), jsNumber(lineNumber));
location->putDirect(exec->vm(), Identifier(exec, "scriptId"), jsString(exec, scriptId));
location->putDirect(exec->vm(), Identifier(exec, "scriptId"), jsString(exec, scriptID));

JSObject* result = constructEmptyObject(exec);
result->putDirect(exec->vm(), Identifier(exec, "location"), location);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/bindings/js/JavaScriptCallFrame.h
Expand Up @@ -45,7 +45,7 @@ class JavaScriptCallFrame : public RefCounted<JavaScriptCallFrame> {
}

JavaScriptCallFrame* caller();
intptr_t sourceID() const { return m_debuggerCallFrame->sourceId(); }
intptr_t sourceID() const { return m_debuggerCallFrame->sourceID(); }
const TextPosition position() const { return m_debuggerCallFrame->position(); }
int line() const { return m_debuggerCallFrame->line(); }
int column() const { return m_debuggerCallFrame->column(); }
Expand Down
32 changes: 16 additions & 16 deletions Source/WebCore/bindings/js/ScriptDebugServer.cpp
Expand Up @@ -88,7 +88,7 @@ ScriptDebugServer::ScriptDebugServer()
, m_currentCallFrame(0)
, m_recompileTimer(this, &ScriptDebugServer::recompileAllJSFunctions)
, m_lastExecutedLine(-1)
, m_lastExecutedSourceId(-1)
, m_lastExecutedSourceID(-1)
{
}

Expand All @@ -101,9 +101,9 @@ String ScriptDebugServer::setBreakpoint(const String& sourceID, const ScriptBrea
intptr_t sourceIDValue = sourceID.toIntPtr();
if (!sourceIDValue)
return "";
SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
if (it == m_sourceIdToBreakpoints.end())
it = m_sourceIdToBreakpoints.set(sourceIDValue, LineToBreakpointsMap()).iterator;
SourceIDToBreakpointsMap::iterator it = m_sourceIDToBreakpoints.find(sourceIDValue);
if (it == m_sourceIDToBreakpoints.end())
it = m_sourceIDToBreakpoints.set(sourceIDValue, LineToBreakpointsMap()).iterator;
LineToBreakpointsMap::iterator breaksIt = it->value.find(scriptBreakpoint.lineNumber);
if (breaksIt == it->value.end())
breaksIt = it->value.set(scriptBreakpoint.lineNumber, BreakpointsInLine()).iterator;
Expand All @@ -122,10 +122,10 @@ String ScriptDebugServer::setBreakpoint(const String& sourceID, const ScriptBrea
return sourceID + ":" + String::number(scriptBreakpoint.lineNumber) + ":" + String::number(scriptBreakpoint.columnNumber);
}

void ScriptDebugServer::removeBreakpoint(const String& breakpointId)
void ScriptDebugServer::removeBreakpoint(const String& breakpointID)
{
Vector<String> tokens;
breakpointId.split(":", tokens);
breakpointID.split(":", tokens);
if (tokens.size() != 3)
return;
bool success;
Expand All @@ -139,8 +139,8 @@ void ScriptDebugServer::removeBreakpoint(const String& breakpointId)
if (!success)
return;

SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
if (it == m_sourceIdToBreakpoints.end())
SourceIDToBreakpointsMap::iterator it = m_sourceIDToBreakpoints.find(sourceIDValue);
if (it == m_sourceIDToBreakpoints.end())
return;
LineToBreakpointsMap::iterator breaksIt = it->value.find(lineNumber);
if (breaksIt == it->value.end())
Expand All @@ -162,8 +162,8 @@ bool ScriptDebugServer::hasBreakpoint(intptr_t sourceID, const TextPosition& pos
if (!m_breakpointsActivated)
return false;

SourceIdToBreakpointsMap::const_iterator it = m_sourceIdToBreakpoints.find(sourceID);
if (it == m_sourceIdToBreakpoints.end())
SourceIDToBreakpointsMap::const_iterator it = m_sourceIDToBreakpoints.find(sourceID);
if (it == m_sourceIDToBreakpoints.end())
return false;

int line = position.m_line.zeroBasedInt();
Expand Down Expand Up @@ -246,7 +246,7 @@ bool ScriptDebugServer::evaluateBreakpointActions(const ScriptBreakpoint& breakp

void ScriptDebugServer::clearBreakpoints()
{
m_sourceIdToBreakpoints.clear();
m_sourceIDToBreakpoints.clear();
updateNumberOfBreakpoints(0);
}

Expand Down Expand Up @@ -478,10 +478,10 @@ void ScriptDebugServer::dispatchFunctionToListeners(JavaScriptExecutionCallback
void ScriptDebugServer::updateCallFrame(CallFrame* callFrame)
{
m_currentCallFrame = callFrame;
intptr_t sourceId = DebuggerCallFrame::sourceIdForCallFrame(callFrame);
if (m_lastExecutedSourceId != sourceId) {
intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(callFrame);
if (m_lastExecutedSourceID != sourceID) {
m_lastExecutedLine = -1;
m_lastExecutedSourceId = sourceId;
m_lastExecutedSourceID = sourceID;
}
}

Expand All @@ -507,9 +507,9 @@ void ScriptDebugServer::pauseIfNeeded(CallFrame* callFrame)
bool pauseNow = m_pauseOnNextStatement;
pauseNow |= (m_pauseOnCallFrame == m_currentCallFrame);

intptr_t sourceId = DebuggerCallFrame::sourceIdForCallFrame(m_currentCallFrame);
intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(m_currentCallFrame);
TextPosition position = DebuggerCallFrame::positionForCallFrame(m_currentCallFrame);
pauseNow |= didHitBreakpoint = hasBreakpoint(sourceId, position, &breakpoint);
pauseNow |= didHitBreakpoint = hasBreakpoint(sourceID, position, &breakpoint);
m_lastExecutedLine = position.m_line.zeroBasedInt();
if (!pauseNow)
return;
Expand Down
12 changes: 6 additions & 6 deletions Source/WebCore/bindings/js/ScriptDebugServer.h
Expand Up @@ -58,7 +58,7 @@ class ScriptDebugServer : protected JSC::Debugger {
WTF_MAKE_NONCOPYABLE(ScriptDebugServer); WTF_MAKE_FAST_ALLOCATED;
public:
String setBreakpoint(const String& sourceID, const ScriptBreakpoint&, int* actualLineNumber, int* actualColumnNumber);
void removeBreakpoint(const String& breakpointId);
void removeBreakpoint(const String& breakpointID);
void clearBreakpoints();
void setBreakpointsActivated(bool activated);
void activateBreakpoints() { setBreakpointsActivated(true); }
Expand Down Expand Up @@ -97,9 +97,9 @@ class ScriptDebugServer : protected JSC::Debugger {
bool isPaused() { return m_paused; }
bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; }

void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptId, String* exceptionMessage);
void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptID, String* exceptionMessage);
void clearCompiledScripts();
void runScript(JSC::ExecState*, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage);
void runScript(JSC::ExecState*, const String& scriptID, ScriptValue* result, bool* wasThrown, String* exceptionMessage);

class Task {
WTF_MAKE_FAST_ALLOCATED;
Expand Down Expand Up @@ -158,7 +158,7 @@ class ScriptDebugServer : protected JSC::Debugger {

typedef Vector<ScriptBreakpoint> BreakpointsInLine;
typedef HashMap<int, BreakpointsInLine, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int>> LineToBreakpointsMap;
typedef HashMap<intptr_t, LineToBreakpointsMap> SourceIdToBreakpointsMap;
typedef HashMap<intptr_t, LineToBreakpointsMap> SourceIDToBreakpointsMap;

bool m_callingListeners;
PauseOnExceptionsState m_pauseOnExceptionsState;
Expand All @@ -170,11 +170,11 @@ class ScriptDebugServer : protected JSC::Debugger {
JSC::CallFrame* m_pauseOnCallFrame;
JSC::CallFrame* m_currentCallFrame;
RefPtr<JSC::DebuggerCallFrame> m_currentDebuggerCallFrame;
SourceIdToBreakpointsMap m_sourceIdToBreakpoints;
SourceIDToBreakpointsMap m_sourceIDToBreakpoints;
Timer<ScriptDebugServer> m_recompileTimer;

int m_lastExecutedLine;
intptr_t m_lastExecutedSourceId;
intptr_t m_lastExecutedSourceID;

friend class DebuggerCallFrameScope;
};
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/inspector/InspectorConsoleAgent.cpp
Expand Up @@ -161,7 +161,7 @@ void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp
addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, arguments, state, requestIdentifier)));
}

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)
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)
{
if (!developerExtrasEnabled())
return;
Expand All @@ -172,7 +172,7 @@ void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp
}

bool canGenerateCallStack = !isWorkerAgent() && m_frontend;
addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier)));
addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier)));
}

Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts()
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/inspector/InspectorConsoleAgent.h
Expand Up @@ -69,7 +69,7 @@ class InspectorConsoleAgent : public InspectorBaseAgent<InspectorConsoleAgent>,
virtual void clearFrontend();

void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);

// FIXME: Remove once we no longer generate stacks outside of Inspector.
void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
Expand Down
12 changes: 6 additions & 6 deletions Source/WebCore/inspector/InspectorConsoleInstrumentation.h
Expand Up @@ -72,18 +72,18 @@ inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSou
#endif
}

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)
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)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
#else
UNUSED_PARAM(page);
UNUSED_PARAM(source);
UNUSED_PARAM(type);
UNUSED_PARAM(level);
UNUSED_PARAM(message);
UNUSED_PARAM(scriptId);
UNUSED_PARAM(scriptID);
UNUSED_PARAM(lineNumber);
UNUSED_PARAM(state);
UNUSED_PARAM(requestIdentifier);
Expand All @@ -107,18 +107,18 @@ inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* wor
#endif
}

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)
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)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope))
addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
#else
UNUSED_PARAM(workerGlobalScope);
UNUSED_PARAM(source);
UNUSED_PARAM(type);
UNUSED_PARAM(level);
UNUSED_PARAM(message);
UNUSED_PARAM(scriptId);
UNUSED_PARAM(scriptID);
UNUSED_PARAM(lineNumber);
UNUSED_PARAM(columnNumber);
UNUSED_PARAM(state);
Expand Down
8 changes: 4 additions & 4 deletions Source/WebCore/inspector/InspectorDOMAgent.cpp
Expand Up @@ -1478,7 +1478,7 @@ PassRefPtr<TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEve
JSC::JSObject* handler = nullptr;
String body;
int lineNumber = 0;
String scriptId;
String scriptID;
String sourceName;
if (auto scriptListener = JSEventListener::cast(eventListener.get())) {
JSC::JSLockHolder lock(scriptListener->isolatedWorld().vm());
Expand All @@ -1490,7 +1490,7 @@ PassRefPtr<TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEve
if (!function->isHostFunction()) {
if (auto executable = function->jsExecutable()) {
lineNumber = executable->lineNo() - 1;
scriptId = executable->sourceID() == JSC::SourceProvider::nullID ? emptyString() : String::number(executable->sourceID());
scriptID = executable->sourceID() == JSC::SourceProvider::nullID ? emptyString() : String::number(executable->sourceID());
sourceName = executable->sourceURL();
}
}
Expand All @@ -1509,9 +1509,9 @@ PassRefPtr<TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEve
if (!injectedScript.hasNoValue())
value->setHandler(injectedScript.wrapObject(ScriptValue(state->vm(), handler), *objectGroupId));
}
if (!scriptId.isNull()) {
if (!scriptID.isNull()) {
RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Location::create()
.setScriptId(scriptId)
.setScriptId(scriptID)
.setLineNumber(lineNumber);
value->setLocation(location.release());
if (!sourceName.isEmpty())
Expand Down

0 comments on commit a1fdd1e

Please sign in to comment.