Changeset 64540 in webkit
- Timestamp:
- Aug 3, 2010 2:33:30 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64539 r64540 1 2010-08-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: debugger code should serialize call frames to InspectorObjects instead of SerializedScriptValues. 6 https://bugs.webkit.org/show_bug.cgi?id=43339 7 8 No new tests. Refactoring. 9 10 * inspector/InjectedScript.cpp: 11 (WebCore::InjectedScript::callFrames): 12 * inspector/InjectedScript.h: 13 * inspector/Inspector.idl: 14 * inspector/InspectorController.cpp: 15 (WebCore::InspectorController::editScriptSource): 16 (WebCore::InspectorController::getScriptSource): 17 (WebCore::InspectorController::currentCallFrames): 18 (WebCore::InspectorController::didPause): 19 * inspector/InspectorController.h: 20 * inspector/front-end/InspectorBackendStub.js: 21 (WebInspector.InspectorBackendStub): 22 1 23 2010-08-03 Nikolas Zimmermann <nzimmermann@rim.com> 2 24 -
trunk/WebCore/bindings/js/ScriptValue.cpp
r64015 r64540 144 144 return inspectorObject; 145 145 } 146 ASSERT_NOT_REACHED(); 146 147 return 0; 147 148 } -
trunk/WebCore/bindings/v8/ScriptValue.cpp
r64464 r64540 114 114 return inspectorObject; 115 115 } 116 ASSERT_NOT_REACHED(); 116 117 return 0; 117 118 } -
trunk/WebCore/inspector/InjectedScript.cpp
r63891 r64540 66 66 67 67 #if ENABLE(JAVASCRIPT_DEBUGGER) 68 PassRefPtr< SerializedScriptValue> InjectedScript::callFrames()68 PassRefPtr<InspectorValue> InjectedScript::callFrames() 69 69 { 70 70 ASSERT(!hasNoValue()); 71 71 ScriptFunctionCall function(m_injectedScriptObject, "callFrames"); 72 72 ScriptValue callFramesValue = function.call(); 73 return callFramesValue. serialize(m_injectedScriptObject.scriptState());73 return callFramesValue.toInspectorValue(m_injectedScriptObject.scriptState()); 74 74 } 75 75 #endif -
trunk/WebCore/inspector/InjectedScript.h
r63891 r64540 52 52 void dispatch(long callId, const String& methodName, const String& arguments, bool async, RefPtr<SerializedScriptValue>* result, bool* hadException); 53 53 #if ENABLE(JAVASCRIPT_DEBUGGER) 54 PassRefPtr< SerializedScriptValue> callFrames();54 PassRefPtr<InspectorValue> callFrames(); 55 55 #endif 56 56 PassRefPtr<InspectorValue> wrapForConsole(ScriptValue); -
trunk/WebCore/inspector/Inspector.idl
r64536 r64540 45 45 [notify] void updateConsoleMessageExpiredCount(out unsigned long count); 46 46 [notify] void updateConsoleMessageRepeatCount(out unsigned long count); 47 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 48 [notify] void pausedScript(out Value callFrames); 49 [notify] void resumedScript(); 50 #endif 47 51 48 52 [handler=Controller] void storeLastActivePanel(in String panelName); … … 83 87 [handler=Controller] void setPauseOnExceptionsState(in long pauseOnExceptionsState); 84 88 85 [handler=Controller] void editScriptSource(in long callId, in String sourceID, in String newContent );86 [handler=Controller] void getScriptSource(in long callId, in String sourceID );89 [handler=Controller] void editScriptSource(in long callId, in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames); 90 [handler=Controller] void getScriptSource(in long callId, in String sourceID, out String scriptSource); 87 91 88 92 [handler=Controller] void enableProfiler(in boolean always); -
trunk/WebCore/inspector/InspectorController.cpp
r64534 r64540 1747 1747 String result; 1748 1748 bool success = ScriptDebugServer::shared().editScriptSource(sourceID, newContent, result); 1749 RefPtr< SerializedScriptValue> callFrames;1749 RefPtr<InspectorValue> callFrames; 1750 1750 if (success) 1751 1751 callFrames = currentCallFrames(); 1752 m_ frontend->didEditScriptSource(callId, success, result, callFrames.get());1752 m_remoteFrontend->didEditScriptSource(callId, success, result, callFrames.get()); 1753 1753 } 1754 1754 … … 1758 1758 return; 1759 1759 String scriptSource = m_scriptIDToContent.get(sourceID); 1760 m_ frontend->didGetScriptSource(callId, scriptSource);1760 m_remoteFrontend->didGetScriptSource(callId, scriptSource); 1761 1761 } 1762 1762 … … 1775 1775 } 1776 1776 1777 PassRefPtr< SerializedScriptValue> InspectorController::currentCallFrames()1777 PassRefPtr<InspectorValue> InspectorController::currentCallFrames() 1778 1778 { 1779 1779 if (!m_pausedScriptState) 1780 return 0;1780 return InspectorValue::null(); 1781 1781 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptFor(m_pausedScriptState); 1782 1782 if (injectedScript.hasNoValue()) { 1783 1783 ASSERT_NOT_REACHED(); 1784 return 0;1784 return InspectorValue::null(); 1785 1785 } 1786 1786 return injectedScript.callFrames(); … … 1874 1874 ASSERT(scriptState && !m_pausedScriptState); 1875 1875 m_pausedScriptState = scriptState; 1876 RefPtr< SerializedScriptValue> callFrames = currentCallFrames();1877 m_ frontend->pausedScript(callFrames.get());1876 RefPtr<InspectorValue> callFrames = currentCallFrames(); 1877 m_remoteFrontend->pausedScript(callFrames.get()); 1878 1878 } 1879 1879 -
trunk/WebCore/inspector/InspectorController.h
r64536 r64540 39 39 #include "ScriptProfile.h" 40 40 #include "ScriptState.h" 41 #include "ScriptValue.h"42 41 #include "StringHash.h" 43 42 #include "Timer.h" … … 270 269 void resume(); 271 270 void setPauseOnExceptionsState(long pauseState); 272 PassRefPtr<SerializedScriptValue> currentCallFrames();273 271 274 272 virtual void didParseSource(const String& sourceID, const String& url, const String& data, int firstLine, ScriptWorldType); … … 309 307 310 308 #if ENABLE(JAVASCRIPT_DEBUGGER) 309 PassRefPtr<InspectorValue> currentCallFrames(); 310 311 311 void setBreakpoint(long callId, const String& sourceID, unsigned lineNumber, bool enabled, const String& condition); 312 312 void removeBreakpoint(const String& sourceID, unsigned lineNumber); -
trunk/WebCore/inspector/InspectorFrontend.cpp
r63427 r64540 358 358 } 359 359 360 void InspectorFrontend::didEditScriptSource(long callId, bool success, const String& result, SerializedScriptValue* newCallFrames)361 {362 ScriptFunctionCall function(m_webInspector, "dispatch");363 function.appendArgument("didEditScriptSource");364 function.appendArgument(callId);365 function.appendArgument(success);366 function.appendArgument(result);367 if (success && newCallFrames) {368 ScriptValue newCallFramesValue = ScriptValue::deserialize(scriptState(), newCallFrames);369 ASSERT(!newCallFramesValue .hasNoValue());370 function.appendArgument(newCallFramesValue);371 }372 function.call();373 }374 375 void InspectorFrontend::didGetScriptSource(long callId, const String& result)376 {377 ScriptFunctionCall function(m_webInspector, "dispatch");378 function.appendArgument("didGetScriptSource");379 function.appendArgument(callId);380 function.appendArgument(result);381 function.call();382 }383 384 360 void InspectorFrontend::profilerWasEnabled() 385 361 { -
trunk/WebCore/inspector/InspectorFrontend.h
r63427 r64540 110 110 void resumedScript(); 111 111 112 void didEditScriptSource(long callId, bool success, const String& result, SerializedScriptValue* newCallFrames);113 void didGetScriptSource(long callId, const String& result);114 115 112 void profilerWasEnabled(); 116 113 void profilerWasDisabled(); -
trunk/WebCore/inspector/front-end/InspectorBackendStub.js
r64534 r64540 105 105 this._registerDelegate("activateBreakpoints"); 106 106 this._registerDelegate("deactivateBreakpoints"); 107 this._registerDelegate("pause"); 107 108 this._registerDelegate("resume"); 108 109 this._registerDelegate("stepIntoStatement");
Note: See TracChangeset
for help on using the changeset viewer.