Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 #include "core/inspector/InspectorDebuggerAgent.h" | 31 #include "core/inspector/InspectorDebuggerAgent.h" |
| 32 #include "core/inspector/JavaScriptCallFrame.h" | 32 #include "core/inspector/JavaScriptCallFrame.h" |
| 33 | 33 |
| 34 #include "bindings/v8/ScriptDebugServer.h" | 34 #include "bindings/v8/ScriptDebugServer.h" |
| 35 #include "bindings/v8/ScriptObject.h" | 35 #include "bindings/v8/ScriptObject.h" |
| 36 #include "bindings/v8/ScriptRegexp.h" | 36 #include "bindings/v8/ScriptRegexp.h" |
| 37 #include "bindings/v8/ScriptSourceCode.h" | 37 #include "bindings/v8/ScriptSourceCode.h" |
| 38 #include "core/dom/Document.h" | |
| 38 #include "core/fetch/Resource.h" | 39 #include "core/fetch/Resource.h" |
| 39 #include "core/inspector/ContentSearchUtils.h" | 40 #include "core/inspector/ContentSearchUtils.h" |
| 40 #include "core/inspector/InjectedScriptManager.h" | 41 #include "core/inspector/InjectedScriptManager.h" |
| 41 #include "core/inspector/InspectorPageAgent.h" | 42 #include "core/inspector/InspectorPageAgent.h" |
| 42 #include "core/inspector/InspectorState.h" | 43 #include "core/inspector/InspectorState.h" |
| 43 #include "core/inspector/InstrumentingAgents.h" | 44 #include "core/inspector/InstrumentingAgents.h" |
| 44 #include "core/inspector/ScriptArguments.h" | 45 #include "core/inspector/ScriptArguments.h" |
| 45 #include "core/inspector/ScriptCallStack.h" | 46 #include "core/inspector/ScriptCallStack.h" |
| 46 #include "platform/JSONValues.h" | 47 #include "platform/JSONValues.h" |
| 47 #include "wtf/text/WTFString.h" | 48 #include "wtf/text/WTFString.h" |
| 48 | 49 |
| 49 using WebCore::TypeBuilder::Array; | 50 using WebCore::TypeBuilder::Array; |
| 50 using WebCore::TypeBuilder::Debugger::BreakpointId; | 51 using WebCore::TypeBuilder::Debugger::BreakpointId; |
| 51 using WebCore::TypeBuilder::Debugger::CallFrame; | 52 using WebCore::TypeBuilder::Debugger::CallFrame; |
| 52 using WebCore::TypeBuilder::Debugger::FunctionDetails; | 53 using WebCore::TypeBuilder::Debugger::FunctionDetails; |
| 53 using WebCore::TypeBuilder::Debugger::Location; | |
| 54 using WebCore::TypeBuilder::Debugger::ScriptId; | 54 using WebCore::TypeBuilder::Debugger::ScriptId; |
| 55 using WebCore::TypeBuilder::Debugger::StackTrace; | 55 using WebCore::TypeBuilder::Debugger::StackTrace; |
| 56 using WebCore::TypeBuilder::Runtime::RemoteObject; | 56 using WebCore::TypeBuilder::Runtime::RemoteObject; |
| 57 | 57 |
| 58 namespace WebCore { | 58 namespace WebCore { |
| 59 | 59 |
| 60 namespace DebuggerAgentState { | 60 namespace DebuggerAgentState { |
| 61 static const char debuggerEnabled[] = "debuggerEnabled"; | 61 static const char debuggerEnabled[] = "debuggerEnabled"; |
| 62 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; | 62 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; |
| 63 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; | 63 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 | 290 |
| 291 static bool matches(const String& url, const String& pattern, bool isRegex) | 291 static bool matches(const String& url, const String& pattern, bool isRegex) |
| 292 { | 292 { |
| 293 if (isRegex) { | 293 if (isRegex) { |
| 294 ScriptRegexp regex(pattern, TextCaseSensitive); | 294 ScriptRegexp regex(pattern, TextCaseSensitive); |
| 295 return regex.match(url) != -1; | 295 return regex.match(url) != -1; |
| 296 } | 296 } |
| 297 return url == pattern; | 297 return url == pattern; |
| 298 } | 298 } |
| 299 | 299 |
| 300 void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int li neNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, c onst bool* isAntiBreakpoint, BreakpointId* outBreakpointId, RefPtr<Array<Locatio n> >& locations) | 300 void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int li neNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, c onst bool* isAntiBreakpoint, BreakpointId* outBreakpointId, RefPtr<Array<TypeBui lder::Debugger::Location> >& locations) |
| 301 { | 301 { |
| 302 locations = Array<Location>::create(); | 302 locations = Array<TypeBuilder::Debugger::Location>::create(); |
| 303 if (!optionalURL == !optionalURLRegex) { | 303 if (!optionalURL == !optionalURLRegex) { |
| 304 *errorString = "Either url or urlRegex must be specified."; | 304 *errorString = "Either url or urlRegex must be specified."; |
| 305 return; | 305 return; |
| 306 } | 306 } |
| 307 | 307 |
| 308 bool isAntiBreakpointValue = isAntiBreakpoint && *isAntiBreakpoint; | 308 bool isAntiBreakpointValue = isAntiBreakpoint && *isAntiBreakpoint; |
| 309 | 309 |
| 310 String url = optionalURL ? *optionalURL : *optionalURLRegex; | 310 String url = optionalURL ? *optionalURL : *optionalURLRegex; |
| 311 int columnNumber; | 311 int columnNumber; |
| 312 if (optionalColumnNumber) { | 312 if (optionalColumnNumber) { |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 329 } | 329 } |
| 330 | 330 |
| 331 breakpointsCookie->setObject(breakpointId, buildObjectForBreakpointCookie(ur l, lineNumber, columnNumber, condition, isRegex, isAntiBreakpointValue)); | 331 breakpointsCookie->setObject(breakpointId, buildObjectForBreakpointCookie(ur l, lineNumber, columnNumber, condition, isRegex, isAntiBreakpointValue)); |
| 332 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCoo kie); | 332 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCoo kie); |
| 333 | 333 |
| 334 if (!isAntiBreakpointValue) { | 334 if (!isAntiBreakpointValue) { |
| 335 ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition); | 335 ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition); |
| 336 for (ScriptsMap::iterator it = m_scripts.begin(); it != m_scripts.end(); ++it) { | 336 for (ScriptsMap::iterator it = m_scripts.begin(); it != m_scripts.end(); ++it) { |
| 337 if (!matches(it->value.url, url, isRegex)) | 337 if (!matches(it->value.url, url, isRegex)) |
| 338 continue; | 338 continue; |
| 339 RefPtr<Location> location = resolveBreakpoint(breakpointId, it->key, breakpoint, UserBreakpointSource); | 339 RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint (breakpointId, it->key, breakpoint, UserBreakpointSource); |
| 340 if (location) | 340 if (location) |
| 341 locations->addItem(location); | 341 locations->addItem(location); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 *outBreakpointId = breakpointId; | 344 *outBreakpointId = breakpointId; |
| 345 } | 345 } |
| 346 | 346 |
| 347 static bool parseLocation(ErrorString* errorString, PassRefPtr<JSONObject> locat ion, String* scriptId, int* lineNumber, int* columnNumber) | 347 static bool parseLocation(ErrorString* errorString, PassRefPtr<JSONObject> locat ion, String* scriptId, int* lineNumber, int* columnNumber) |
| 348 { | 348 { |
| 349 if (!location->getString("scriptId", scriptId) || !location->getNumber("line Number", lineNumber)) { | 349 if (!location->getString("scriptId", scriptId) || !location->getNumber("line Number", lineNumber)) { |
| 350 // FIXME: replace with input validation. | 350 // FIXME: replace with input validation. |
| 351 *errorString = "scriptId and lineNumber are required."; | 351 *errorString = "scriptId and lineNumber are required."; |
| 352 return false; | 352 return false; |
| 353 } | 353 } |
| 354 *columnNumber = 0; | 354 *columnNumber = 0; |
| 355 location->getNumber("columnNumber", columnNumber); | 355 location->getNumber("columnNumber", columnNumber); |
| 356 return true; | 356 return true; |
| 357 } | 357 } |
| 358 | 358 |
| 359 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPt r<JSONObject>& location, const String* const optionalCondition, BreakpointId* ou tBreakpointId, RefPtr<Location>& actualLocation) | 359 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPt r<JSONObject>& location, const String* const optionalCondition, BreakpointId* ou tBreakpointId, RefPtr<TypeBuilder::Debugger::Location>& actualLocation) |
| 360 { | 360 { |
| 361 String scriptId; | 361 String scriptId; |
| 362 int lineNumber; | 362 int lineNumber; |
| 363 int columnNumber; | 363 int columnNumber; |
| 364 | 364 |
| 365 if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNum ber)) | 365 if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNum ber)) |
| 366 return; | 366 return; |
| 367 | 367 |
| 368 String condition = optionalCondition ? *optionalCondition : emptyString(); | 368 String condition = optionalCondition ? *optionalCondition : emptyString(); |
| 369 | 369 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 int columnNumber; | 422 int columnNumber; |
| 423 | 423 |
| 424 if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNum ber)) | 424 if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNum ber)) |
| 425 return; | 425 return; |
| 426 | 426 |
| 427 ScriptBreakpoint breakpoint(lineNumber, columnNumber, ""); | 427 ScriptBreakpoint breakpoint(lineNumber, columnNumber, ""); |
| 428 m_continueToLocationBreakpointId = scriptDebugServer().setBreakpoint(scriptI d, breakpoint, &lineNumber, &columnNumber, interstateLocation); | 428 m_continueToLocationBreakpointId = scriptDebugServer().setBreakpoint(scriptI d, breakpoint, &lineNumber, &columnNumber, interstateLocation); |
| 429 resume(errorString); | 429 resume(errorString); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void InspectorDebuggerAgent::getStepInPositions(ErrorString* errorString, const String& callFrameId, RefPtr<Array<Location> >& positions) | 432 void InspectorDebuggerAgent::getStepInPositions(ErrorString* errorString, const String& callFrameId, RefPtr<Array<TypeBuilder::Debugger::Location> >& positions) |
| 433 { | 433 { |
| 434 if (!isPaused() || m_currentCallStack.isNull()) { | 434 if (!isPaused() || m_currentCallStack.isNull()) { |
| 435 *errorString = "Attempt to access callframe when debugger is not on paus e"; | 435 *errorString = "Attempt to access callframe when debugger is not on paus e"; |
| 436 return; | 436 return; |
| 437 } | 437 } |
| 438 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForOb jectId(callFrameId); | 438 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForOb jectId(callFrameId); |
| 439 if (injectedScript.hasNoValue()) { | 439 if (injectedScript.hasNoValue()) { |
| 440 *errorString = "Inspected frame has gone"; | 440 *errorString = "Inspected frame has gone"; |
| 441 return; | 441 return; |
| 442 } | 442 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 535 if (m_skipStepInCount > 0) { | 535 if (m_skipStepInCount > 0) { |
| 536 --m_skipStepInCount; | 536 --m_skipStepInCount; |
| 537 return ScriptDebugListener::StepInto; | 537 return ScriptDebugListener::StepInto; |
| 538 } | 538 } |
| 539 return ScriptDebugListener::StepOut; | 539 return ScriptDebugListener::StepOut; |
| 540 } | 540 } |
| 541 } | 541 } |
| 542 return ScriptDebugListener::NoSkip; | 542 return ScriptDebugListener::NoSkip; |
| 543 } | 543 } |
| 544 | 544 |
| 545 PassRefPtr<Location> InspectorDebuggerAgent::resolveBreakpoint(const String& bre akpointId, const String& scriptId, const ScriptBreakpoint& breakpoint, Breakpoin tSource source) | 545 PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreak point(const String& breakpointId, const String& scriptId, const ScriptBreakpoint & breakpoint, BreakpointSource source) |
| 546 { | 546 { |
| 547 ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); | 547 ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); |
| 548 if (scriptIterator == m_scripts.end()) | 548 if (scriptIterator == m_scripts.end()) |
| 549 return 0; | 549 return 0; |
| 550 Script& script = scriptIterator->value; | 550 Script& script = scriptIterator->value; |
| 551 if (breakpoint.lineNumber < script.startLine || script.endLine < breakpoint. lineNumber) | 551 if (breakpoint.lineNumber < script.startLine || script.endLine < breakpoint. lineNumber) |
| 552 return 0; | 552 return 0; |
| 553 | 553 |
| 554 int actualLineNumber; | 554 int actualLineNumber; |
| 555 int actualColumnNumber; | 555 int actualColumnNumber; |
| 556 String debugServerBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &actualLineNumber, &actualColumnNumber, false); | 556 String debugServerBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &actualLineNumber, &actualColumnNumber, false); |
| 557 if (debugServerBreakpointId.isEmpty()) | 557 if (debugServerBreakpointId.isEmpty()) |
| 558 return 0; | 558 return 0; |
| 559 | 559 |
| 560 m_serverBreakpoints.set(debugServerBreakpointId, std::make_pair(breakpointId , source)); | 560 m_serverBreakpoints.set(debugServerBreakpointId, std::make_pair(breakpointId , source)); |
| 561 | 561 |
| 562 BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIds Iterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId); | 562 BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIds Iterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId); |
| 563 if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpoin tIds.end()) | 563 if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpoin tIds.end()) |
| 564 debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpoint Ids.set(breakpointId, Vector<String>()).iterator; | 564 debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpoint Ids.set(breakpointId, Vector<String>()).iterator; |
| 565 debugServerBreakpointIdsIterator->value.append(debugServerBreakpointId); | 565 debugServerBreakpointIdsIterator->value.append(debugServerBreakpointId); |
| 566 | 566 |
| 567 RefPtr<Location> location = Location::create() | 567 RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Lo cation::create() |
| 568 .setScriptId(scriptId) | 568 .setScriptId(scriptId) |
| 569 .setLineNumber(actualLineNumber); | 569 .setLineNumber(actualLineNumber); |
| 570 location->setColumnNumber(actualColumnNumber); | 570 location->setColumnNumber(actualColumnNumber); |
| 571 return location; | 571 return location; |
| 572 } | 572 } |
| 573 | 573 |
| 574 static PassRefPtr<JSONObject> scriptToInspectorObject(ScriptObject scriptObject) | 574 static PassRefPtr<JSONObject> scriptToInspectorObject(ScriptObject scriptObject) |
| 575 { | 575 { |
| 576 if (scriptObject.hasNoValue()) | 576 if (scriptObject.hasNoValue()) |
| 577 return 0; | 577 return 0; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 653 } | 653 } |
| 654 | 654 |
| 655 void InspectorDebuggerAgent::cancelPauseOnNextStatement() | 655 void InspectorDebuggerAgent::cancelPauseOnNextStatement() |
| 656 { | 656 { |
| 657 if (m_javaScriptPauseScheduled) | 657 if (m_javaScriptPauseScheduled) |
| 658 return; | 658 return; |
| 659 clearBreakDetails(); | 659 clearBreakDetails(); |
| 660 scriptDebugServer().setPauseOnNextStatement(false); | 660 scriptDebugServer().setPauseOnNextStatement(false); |
| 661 } | 661 } |
| 662 | 662 |
| 663 void InspectorDebuggerAgent::didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singleShot) | 663 void InspectorDebuggerAgent::didInstallTimer(ExecutionContext* context, int time rId, int timeout, bool singleShot) |
| 664 { | 664 { |
| 665 if (m_asyncCallStackTracker.isEnabled()) | 665 if (m_asyncCallStackTracker.isEnabled()) |
| 666 m_asyncCallStackTracker.didInstallTimer(timerId, singleShot, scriptDebug Server().currentCallFrames()); | 666 m_asyncCallStackTracker.didInstallTimer(context, timerId, singleShot, sc riptDebugServer().currentCallFrames()); |
| 667 } | 667 } |
| 668 | 668 |
| 669 void InspectorDebuggerAgent::didRemoveTimer(ExecutionContext*, int timerId) | 669 void InspectorDebuggerAgent::didRemoveTimer(ExecutionContext* context, int timer Id) |
| 670 { | 670 { |
| 671 m_asyncCallStackTracker.didRemoveTimer(timerId); | 671 m_asyncCallStackTracker.didRemoveTimer(context, timerId); |
| 672 } | 672 } |
| 673 | 673 |
| 674 bool InspectorDebuggerAgent::willFireTimer(ExecutionContext*, int timerId) | 674 bool InspectorDebuggerAgent::willFireTimer(ExecutionContext* context, int timerI d) |
| 675 { | 675 { |
| 676 m_asyncCallStackTracker.willFireTimer(timerId); | 676 m_asyncCallStackTracker.willFireTimer(context, timerId); |
| 677 return true; | 677 return true; |
| 678 } | 678 } |
| 679 | 679 |
| 680 void InspectorDebuggerAgent::didFireTimer() | 680 void InspectorDebuggerAgent::didFireTimer() |
| 681 { | 681 { |
| 682 m_asyncCallStackTracker.didFireAsyncCall(); | 682 m_asyncCallStackTracker.didFireAsyncCall(); |
| 683 cancelPauseOnNextStatement(); | 683 cancelPauseOnNextStatement(); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void InspectorDebuggerAgent::didRequestAnimationFrame(Document*, int callbackId) | 686 void InspectorDebuggerAgent::didRequestAnimationFrame(Document* document, int ca llbackId) |
| 687 { | 687 { |
| 688 if (m_asyncCallStackTracker.isEnabled()) | 688 if (m_asyncCallStackTracker.isEnabled()) |
| 689 m_asyncCallStackTracker.didRequestAnimationFrame(callbackId, scriptDebug Server().currentCallFrames()); | 689 m_asyncCallStackTracker.didRequestAnimationFrame(static_cast<ExecutionCo ntext*>(document), callbackId, scriptDebugServer().currentCallFrames()); |
|
pfeldman
2013/12/10 15:45:02
no need to cast
| |
| 690 } | 690 } |
| 691 | 691 |
| 692 void InspectorDebuggerAgent::didCancelAnimationFrame(Document*, int callbackId) | 692 void InspectorDebuggerAgent::didCancelAnimationFrame(Document* document, int cal lbackId) |
| 693 { | 693 { |
| 694 m_asyncCallStackTracker.didCancelAnimationFrame(callbackId); | 694 m_asyncCallStackTracker.didCancelAnimationFrame(static_cast<ExecutionContext *>(document), callbackId); |
| 695 } | 695 } |
| 696 | 696 |
| 697 bool InspectorDebuggerAgent::willFireAnimationFrame(Document*, int callbackId) | 697 bool InspectorDebuggerAgent::willFireAnimationFrame(Document* document, int call backId) |
| 698 { | 698 { |
| 699 m_asyncCallStackTracker.willFireAnimationFrame(callbackId); | 699 m_asyncCallStackTracker.willFireAnimationFrame(static_cast<ExecutionContext* >(document), callbackId); |
| 700 return true; | 700 return true; |
| 701 } | 701 } |
| 702 | 702 |
| 703 void InspectorDebuggerAgent::didFireAnimationFrame() | 703 void InspectorDebuggerAgent::didFireAnimationFrame() |
| 704 { | 704 { |
| 705 m_asyncCallStackTracker.didFireAsyncCall(); | 705 m_asyncCallStackTracker.didFireAsyncCall(); |
| 706 } | 706 } |
| 707 | 707 |
| 708 void InspectorDebuggerAgent::didHandleEvent() | 708 void InspectorDebuggerAgent::didHandleEvent() |
| 709 { | 709 { |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1034 bool isRegex; | 1034 bool isRegex; |
| 1035 breakpointObject->getBoolean(DebuggerAgentState::isRegex, &isRegex); | 1035 breakpointObject->getBoolean(DebuggerAgentState::isRegex, &isRegex); |
| 1036 String url; | 1036 String url; |
| 1037 breakpointObject->getString(DebuggerAgentState::url, &url); | 1037 breakpointObject->getString(DebuggerAgentState::url, &url); |
| 1038 if (!matches(scriptURL, url, isRegex)) | 1038 if (!matches(scriptURL, url, isRegex)) |
| 1039 continue; | 1039 continue; |
| 1040 ScriptBreakpoint breakpoint; | 1040 ScriptBreakpoint breakpoint; |
| 1041 breakpointObject->getNumber(DebuggerAgentState::lineNumber, &breakpoint. lineNumber); | 1041 breakpointObject->getNumber(DebuggerAgentState::lineNumber, &breakpoint. lineNumber); |
| 1042 breakpointObject->getNumber(DebuggerAgentState::columnNumber, &breakpoin t.columnNumber); | 1042 breakpointObject->getNumber(DebuggerAgentState::columnNumber, &breakpoin t.columnNumber); |
| 1043 breakpointObject->getString(DebuggerAgentState::condition, &breakpoint.c ondition); | 1043 breakpointObject->getString(DebuggerAgentState::condition, &breakpoint.c ondition); |
| 1044 RefPtr<Location> location = resolveBreakpoint(it->key, scriptId, breakpo int, UserBreakpointSource); | 1044 RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it- >key, scriptId, breakpoint, UserBreakpointSource); |
| 1045 if (location) | 1045 if (location) |
| 1046 m_frontend->breakpointResolved(it->key, location); | 1046 m_frontend->breakpointResolved(it->key, location); |
| 1047 } | 1047 } |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 void InspectorDebuggerAgent::failedToParseSource(const String& url, const String & data, int firstLine, int errorLine, const String& errorMessage) | 1050 void InspectorDebuggerAgent::failedToParseSource(const String& url, const String & data, int firstLine, int errorLine, const String& errorMessage) |
| 1051 { | 1051 { |
| 1052 m_frontend->scriptFailedToParse(url, data, firstLine, errorLine, errorMessag e); | 1052 m_frontend->scriptFailedToParse(url, data, firstLine, errorLine, errorMessag e); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1161 { | 1161 { |
| 1162 m_scripts.clear(); | 1162 m_scripts.clear(); |
| 1163 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1163 m_breakpointIdToDebugServerBreakpointIds.clear(); |
| 1164 m_asyncCallStackTracker.clear(); | 1164 m_asyncCallStackTracker.clear(); |
| 1165 if (m_frontend) | 1165 if (m_frontend) |
| 1166 m_frontend->globalObjectCleared(); | 1166 m_frontend->globalObjectCleared(); |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 } // namespace WebCore | 1169 } // namespace WebCore |
| 1170 | 1170 |
| OLD | NEW |