[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
yurys at chromium.org
yurys at chromium.org
Wed Dec 22 11:40:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b307a6dfc10b90f5655b00a0af25ce630b4e29cb
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 3 09:33:30 2010 +0000
2010-08-02 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: debugger code should serialize call frames to InspectorObjects instead of SerializedScriptValues.
https://bugs.webkit.org/show_bug.cgi?id=43339
No new tests. Refactoring.
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::callFrames):
* inspector/InjectedScript.h:
* inspector/Inspector.idl:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::editScriptSource):
(WebCore::InspectorController::getScriptSource):
(WebCore::InspectorController::currentCallFrames):
(WebCore::InspectorController::didPause):
* inspector/InspectorController.h:
* inspector/front-end/InspectorBackendStub.js:
(WebInspector.InspectorBackendStub):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bf126ea..3d04ef3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-08-02 Yury Semikhatsky <yurys at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: debugger code should serialize call frames to InspectorObjects instead of SerializedScriptValues.
+ https://bugs.webkit.org/show_bug.cgi?id=43339
+
+ No new tests. Refactoring.
+
+ * inspector/InjectedScript.cpp:
+ (WebCore::InjectedScript::callFrames):
+ * inspector/InjectedScript.h:
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::editScriptSource):
+ (WebCore::InspectorController::getScriptSource):
+ (WebCore::InspectorController::currentCallFrames):
+ (WebCore::InspectorController::didPause):
+ * inspector/InspectorController.h:
+ * inspector/front-end/InspectorBackendStub.js:
+ (WebInspector.InspectorBackendStub):
+
2010-08-03 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
diff --git a/WebCore/bindings/js/ScriptValue.cpp b/WebCore/bindings/js/ScriptValue.cpp
index abc31e2..23934cd 100644
--- a/WebCore/bindings/js/ScriptValue.cpp
+++ b/WebCore/bindings/js/ScriptValue.cpp
@@ -143,6 +143,7 @@ static PassRefPtr<InspectorValue> jsToInspectorValue(ScriptState* scriptState, J
}
return inspectorObject;
}
+ ASSERT_NOT_REACHED();
return 0;
}
diff --git a/WebCore/bindings/v8/ScriptValue.cpp b/WebCore/bindings/v8/ScriptValue.cpp
index 54f3860..d3d4785 100755
--- a/WebCore/bindings/v8/ScriptValue.cpp
+++ b/WebCore/bindings/v8/ScriptValue.cpp
@@ -113,6 +113,7 @@ static PassRefPtr<InspectorValue> v8ToInspectorValue(v8::Handle<v8::Value> value
}
return inspectorObject;
}
+ ASSERT_NOT_REACHED();
return 0;
}
diff --git a/WebCore/inspector/InjectedScript.cpp b/WebCore/inspector/InjectedScript.cpp
index 5f2fb74..931a238 100644
--- a/WebCore/inspector/InjectedScript.cpp
+++ b/WebCore/inspector/InjectedScript.cpp
@@ -65,12 +65,12 @@ void InjectedScript::dispatch(long callId, const String& methodName, const Strin
}
#if ENABLE(JAVASCRIPT_DEBUGGER)
-PassRefPtr<SerializedScriptValue> InjectedScript::callFrames()
+PassRefPtr<InspectorValue> InjectedScript::callFrames()
{
ASSERT(!hasNoValue());
ScriptFunctionCall function(m_injectedScriptObject, "callFrames");
ScriptValue callFramesValue = function.call();
- return callFramesValue.serialize(m_injectedScriptObject.scriptState());
+ return callFramesValue.toInspectorValue(m_injectedScriptObject.scriptState());
}
#endif
diff --git a/WebCore/inspector/InjectedScript.h b/WebCore/inspector/InjectedScript.h
index f6b6e19..8035dc7 100644
--- a/WebCore/inspector/InjectedScript.h
+++ b/WebCore/inspector/InjectedScript.h
@@ -51,7 +51,7 @@ public:
void dispatch(long callId, const String& methodName, const String& arguments, bool async, RefPtr<SerializedScriptValue>* result, bool* hadException);
#if ENABLE(JAVASCRIPT_DEBUGGER)
- PassRefPtr<SerializedScriptValue> callFrames();
+ PassRefPtr<InspectorValue> callFrames();
#endif
PassRefPtr<InspectorValue> wrapForConsole(ScriptValue);
void releaseWrapperObjectGroup(const String&);
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 11fb378..25de2b3 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -44,6 +44,10 @@ module core {
[notify] void setDocument(out Value root);
[notify] void updateConsoleMessageExpiredCount(out unsigned long count);
[notify] void updateConsoleMessageRepeatCount(out unsigned long count);
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+ [notify] void pausedScript(out Value callFrames);
+ [notify] void resumedScript();
+#endif
[handler=Controller] void storeLastActivePanel(in String panelName);
@@ -82,8 +86,8 @@ module core {
[handler=Controller] void setPauseOnExceptionsState(in long pauseOnExceptionsState);
- [handler=Controller] void editScriptSource(in long callId, in String sourceID, in String newContent);
- [handler=Controller] void getScriptSource(in long callId, in String sourceID);
+ [handler=Controller] void editScriptSource(in long callId, in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
+ [handler=Controller] void getScriptSource(in long callId, in String sourceID, out String scriptSource);
[handler=Controller] void enableProfiler(in boolean always);
[handler=Controller] void disableProfiler(in boolean always);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index c20c96a..5d81ac3 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -1746,10 +1746,10 @@ void InspectorController::editScriptSource(long callId, const String& sourceID,
{
String result;
bool success = ScriptDebugServer::shared().editScriptSource(sourceID, newContent, result);
- RefPtr<SerializedScriptValue> callFrames;
+ RefPtr<InspectorValue> callFrames;
if (success)
callFrames = currentCallFrames();
- m_frontend->didEditScriptSource(callId, success, result, callFrames.get());
+ m_remoteFrontend->didEditScriptSource(callId, success, result, callFrames.get());
}
void InspectorController::getScriptSource(long callId, const String& sourceID)
@@ -1757,7 +1757,7 @@ void InspectorController::getScriptSource(long callId, const String& sourceID)
if (!m_frontend)
return;
String scriptSource = m_scriptIDToContent.get(sourceID);
- m_frontend->didGetScriptSource(callId, scriptSource);
+ m_remoteFrontend->didGetScriptSource(callId, scriptSource);
}
void InspectorController::resume()
@@ -1774,14 +1774,14 @@ void InspectorController::setPauseOnExceptionsState(long pauseState)
m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
}
-PassRefPtr<SerializedScriptValue> InspectorController::currentCallFrames()
+PassRefPtr<InspectorValue> InspectorController::currentCallFrames()
{
if (!m_pausedScriptState)
- return 0;
+ return InspectorValue::null();
InjectedScript injectedScript = m_injectedScriptHost->injectedScriptFor(m_pausedScriptState);
if (injectedScript.hasNoValue()) {
ASSERT_NOT_REACHED();
- return 0;
+ return InspectorValue::null();
}
return injectedScript.callFrames();
}
@@ -1873,8 +1873,8 @@ void InspectorController::didPause(ScriptState* scriptState)
{
ASSERT(scriptState && !m_pausedScriptState);
m_pausedScriptState = scriptState;
- RefPtr<SerializedScriptValue> callFrames = currentCallFrames();
- m_frontend->pausedScript(callFrames.get());
+ RefPtr<InspectorValue> callFrames = currentCallFrames();
+ m_remoteFrontend->pausedScript(callFrames.get());
}
void InspectorController::didContinue()
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index ecd37f3..890af31 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -38,7 +38,6 @@
#include "ScriptObject.h"
#include "ScriptProfile.h"
#include "ScriptState.h"
-#include "ScriptValue.h"
#include "StringHash.h"
#include "Timer.h"
#include <wtf/HashMap.h>
@@ -269,7 +268,6 @@ public:
void resume();
void setPauseOnExceptionsState(long pauseState);
- PassRefPtr<SerializedScriptValue> currentCallFrames();
virtual void didParseSource(const String& sourceID, const String& url, const String& data, int firstLine, ScriptWorldType);
virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage);
@@ -308,6 +306,8 @@ private:
void releaseFrontendLifetimeAgents();
#if ENABLE(JAVASCRIPT_DEBUGGER)
+ PassRefPtr<InspectorValue> currentCallFrames();
+
void setBreakpoint(long callId, const String& sourceID, unsigned lineNumber, bool enabled, const String& condition);
void removeBreakpoint(const String& sourceID, unsigned lineNumber);
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 5925741..8cfd730 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -357,30 +357,6 @@ void InspectorFrontend::resumedScript()
callSimpleFunction("resumedScript");
}
-void InspectorFrontend::didEditScriptSource(long callId, bool success, const String& result, SerializedScriptValue* newCallFrames)
-{
- ScriptFunctionCall function(m_webInspector, "dispatch");
- function.appendArgument("didEditScriptSource");
- function.appendArgument(callId);
- function.appendArgument(success);
- function.appendArgument(result);
- if (success && newCallFrames) {
- ScriptValue newCallFramesValue = ScriptValue::deserialize(scriptState(), newCallFrames);
- ASSERT(!newCallFramesValue .hasNoValue());
- function.appendArgument(newCallFramesValue);
- }
- function.call();
-}
-
-void InspectorFrontend::didGetScriptSource(long callId, const String& result)
-{
- ScriptFunctionCall function(m_webInspector, "dispatch");
- function.appendArgument("didGetScriptSource");
- function.appendArgument(callId);
- function.appendArgument(result);
- function.call();
-}
-
void InspectorFrontend::profilerWasEnabled()
{
callSimpleFunction("profilerWasEnabled");
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index e6567be..2d37dd3 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -109,9 +109,6 @@ namespace WebCore {
void pausedScript(SerializedScriptValue* callFrames);
void resumedScript();
- void didEditScriptSource(long callId, bool success, const String& result, SerializedScriptValue* newCallFrames);
- void didGetScriptSource(long callId, const String& result);
-
void profilerWasEnabled();
void profilerWasDisabled();
void addProfileHeader(const ScriptValue& profile);
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index fcb0b2e..7727a48 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -104,6 +104,7 @@ WebInspector.InspectorBackendStub = function()
this._registerDelegate("removeBreakpoint");
this._registerDelegate("activateBreakpoints");
this._registerDelegate("deactivateBreakpoints");
+ this._registerDelegate("pause");
this._registerDelegate("resume");
this._registerDelegate("stepIntoStatement");
this._registerDelegate("stepOutOfFunction");
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list