Changeset 167816 in webkit
- Timestamp:
- Apr 25, 2014 12:45:06 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r167814 r167816 1 2014-04-25 Mark Lam <mark.lam@apple.com> 2 3 Refactor debugging code to use BreakpointActions instead of Vector<ScriptBreakpointAction>. 4 <https://webkit.org/b/132201> 5 6 Reviewed by Joseph Pecoraro. 7 8 BreakpointActions is Vector<ScriptBreakpointAction>. Let's just consistently use 9 BreakpointActions everywhere. 10 11 * inspector/ScriptBreakpoint.h: 12 (Inspector::ScriptBreakpoint::ScriptBreakpoint): 13 * inspector/ScriptDebugServer.cpp: 14 (Inspector::ScriptDebugServer::setBreakpoint): 15 (Inspector::ScriptDebugServer::getActionsForBreakpoint): 16 * inspector/ScriptDebugServer.h: 17 * inspector/agents/InspectorDebuggerAgent.cpp: 18 (Inspector::InspectorDebuggerAgent::breakpointActionsFromProtocol): 19 (Inspector::InspectorDebuggerAgent::setBreakpointByUrl): 20 (Inspector::InspectorDebuggerAgent::setBreakpoint): 21 (Inspector::InspectorDebuggerAgent::removeBreakpoint): 22 * inspector/agents/InspectorDebuggerAgent.h: 23 1 24 2014-04-24 Filip Pizlo <fpizlo@apple.com> 2 25 -
trunk/Source/JavaScriptCore/inspector/ScriptBreakpoint.h
r165676 r167816 56 56 }; 57 57 58 typedef Vector<ScriptBreakpointAction> BreakpointActions; 59 58 60 struct ScriptBreakpoint { 59 61 ScriptBreakpoint() … … 69 71 } 70 72 71 ScriptBreakpoint(int lineNumber, int columnNumber, const String& condition, Vector<ScriptBreakpointAction>& actions, bool autoContinue)73 ScriptBreakpoint(int lineNumber, int columnNumber, const String& condition, BreakpointActions& actions, bool autoContinue) 72 74 : lineNumber(lineNumber) 73 75 , columnNumber(columnNumber) … … 81 83 int columnNumber; 82 84 String condition; 83 Vector<ScriptBreakpointAction>actions;85 BreakpointActions actions; 84 86 bool autoContinue; 85 87 }; -
trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp
r165676 r167816 71 71 ASSERT(it == m_breakpointIDToActions.end()); 72 72 #endif 73 const Vector<ScriptBreakpointAction> &actions = scriptBreakpoint.actions;73 const BreakpointActions& actions = scriptBreakpoint.actions; 74 74 m_breakpointIDToActions.set(id, actions); 75 75 } … … 325 325 } 326 326 327 const Vector<ScriptBreakpointAction>& ScriptDebugServer::getActionsForBreakpoint(JSC::BreakpointID breakpointID)327 const BreakpointActions& ScriptDebugServer::getActionsForBreakpoint(JSC::BreakpointID breakpointID) 328 328 { 329 329 ASSERT(breakpointID != JSC::noBreakpointID); … … 332 332 return m_breakpointIDToActions.find(breakpointID)->value; 333 333 334 static NeverDestroyed< Vector<ScriptBreakpointAction>> emptyActionVector = Vector<ScriptBreakpointAction>();334 static NeverDestroyed<BreakpointActions> emptyActionVector = BreakpointActions(); 335 335 return emptyActionVector; 336 336 } -
trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h
r165676 r167816 59 59 virtual void recompileAllJSFunctions() = 0; 60 60 61 const Vector<ScriptBreakpointAction>& getActionsForBreakpoint(JSC::BreakpointID);61 const BreakpointActions& getActionsForBreakpoint(JSC::BreakpointID); 62 62 63 63 class Task { … … 97 97 98 98 private: 99 typedef Vector<ScriptBreakpointAction> BreakpointActions;100 99 typedef HashMap<JSC::BreakpointID, BreakpointActions> BreakpointIDToActionsMap; 101 100 -
trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
r165676 r167816 196 196 } 197 197 198 bool InspectorDebuggerAgent::breakpointActionsFromProtocol(ErrorString* errorString, RefPtr<InspectorArray>& actions, Vector<ScriptBreakpointAction>* result)198 bool InspectorDebuggerAgent::breakpointActionsFromProtocol(ErrorString* errorString, RefPtr<InspectorArray>& actions, BreakpointActions* result) 199 199 { 200 200 if (!actions) … … 267 267 } 268 268 269 Vector<ScriptBreakpointAction>breakpointActions;269 BreakpointActions breakpointActions; 270 270 if (!breakpointActionsFromProtocol(errorString, actions, &breakpointActions)) 271 271 return; … … 318 318 } 319 319 320 Vector<ScriptBreakpointAction>breakpointActions;320 BreakpointActions breakpointActions; 321 321 if (!breakpointActionsFromProtocol(errorString, actions, &breakpointActions)) 322 322 return; … … 343 343 344 344 for (JSC::BreakpointID breakpointID : m_breakpointIdentifierToDebugServerBreakpointIDs.take(breakpointIdentifier)) { 345 const Vector<ScriptBreakpointAction>& breakpointActions = scriptDebugServer().getActionsForBreakpoint(breakpointID);345 const BreakpointActions& breakpointActions = scriptDebugServer().getActionsForBreakpoint(breakpointID); 346 346 for (auto& action : breakpointActions) 347 347 m_injectedScriptManager->releaseObjectGroup(objectGroupForBreakpointAction(action)); -
trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
r165676 r167816 144 144 void clearBreakDetails(); 145 145 146 bool breakpointActionsFromProtocol(ErrorString*, RefPtr<InspectorArray>& actions, Vector<ScriptBreakpointAction>* result);146 bool breakpointActionsFromProtocol(ErrorString*, RefPtr<InspectorArray>& actions, BreakpointActions* result); 147 147 148 148 typedef HashMap<JSC::SourceID, Script> ScriptsMap;
Note: See TracChangeset
for help on using the changeset viewer.