From 65788ff24bb61f09da3f3a46fc828dde2614f87f Mon Sep 17 00:00:00 2001 From: "loislo@chromium.org" Date: Fri, 17 Feb 2012 16:55:06 +0000 Subject: [PATCH] Unreviewed, rolling out r108077. http://trac.webkit.org/changeset/108077 https://bugs.webkit.org/show_bug.cgi?id=78390 it broke compilation. * inspector/CodeGeneratorInspector.py: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::evaluateOnCallFrame): (WebCore::InjectedScript::getFunctionDetails): (WebCore::InjectedScript::getProperties): (WebCore::InjectedScript::wrapCallFrames): * inspector/InjectedScript.h: (InjectedScript): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::getFunctionDetails): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): (WebCore::InspectorDebuggerAgent::currentCallFrames): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108083 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 26 +++++++++++++++++++++ Source/WebCore/inspector/CodeGeneratorInspector.py | 3 +-- Source/WebCore/inspector/InjectedScript.cpp | 24 +++++++------------ Source/WebCore/inspector/InjectedScript.h | 7 +++--- .../WebCore/inspector/InspectorDebuggerAgent.cpp | 27 +++++++--------------- Source/WebCore/inspector/InspectorDebuggerAgent.h | 4 ++-- 6 files changed, 48 insertions(+), 43 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 44d21f4..9afde8d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,29 @@ +2012-02-17 Ilya Tikhonovsky + + Unreviewed, rolling out r108077. + http://trac.webkit.org/changeset/108077 + https://bugs.webkit.org/show_bug.cgi?id=78390 + + it broke compilation. + + * inspector/CodeGeneratorInspector.py: + * inspector/InjectedScript.cpp: + (WebCore::InjectedScript::evaluateOnCallFrame): + (WebCore::InjectedScript::getFunctionDetails): + (WebCore::InjectedScript::getProperties): + (WebCore::InjectedScript::wrapCallFrames): + * inspector/InjectedScript.h: + (InjectedScript): + * inspector/InspectorDebuggerAgent.cpp: + (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): + (WebCore::InspectorDebuggerAgent::resolveBreakpoint): + (WebCore::InspectorDebuggerAgent::getFunctionDetails): + (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): + (WebCore::InspectorDebuggerAgent::currentCallFrames): + (WebCore::InspectorDebuggerAgent::didParseSource): + * inspector/InspectorDebuggerAgent.h: + (InspectorDebuggerAgent): + 2012-02-17 Florin Malita chrome.dll!WebCore::SVGTRefElement::updateReferencedText ReadAV@NULL (e85cb8e140071fa7790cad215b0109dc) diff --git a/Source/WebCore/inspector/CodeGeneratorInspector.py b/Source/WebCore/inspector/CodeGeneratorInspector.py index a05f42c..c3e2165 100755 --- a/Source/WebCore/inspector/CodeGeneratorInspector.py +++ b/Source/WebCore/inspector/CodeGeneratorInspector.py @@ -56,8 +56,7 @@ TYPE_NAME_FIX_MAP = { } -TYPES_WITH_RUNTIME_CAST_SET = frozenset(["Runtime.RemoteObject", "Runtime.PropertyDescriptor", - "Debugger.FunctionDetails", "Debugger.CallFrame"]) +TYPES_WITH_RUNTIME_CAST_SET = frozenset([]) cmdline_parser = optparse.OptionParser() diff --git a/Source/WebCore/inspector/InjectedScript.cpp b/Source/WebCore/inspector/InjectedScript.cpp index 7a0abd7..47e09c7 100644 --- a/Source/WebCore/inspector/InjectedScript.cpp +++ b/Source/WebCore/inspector/InjectedScript.cpp @@ -43,12 +43,6 @@ #include "PlatformString.h" #include "ScriptFunctionCall.h" -using WebCore::TypeBuilder::Array; -using WebCore::TypeBuilder::Debugger::CallFrame; -using WebCore::TypeBuilder::Runtime::PropertyDescriptor; -using WebCore::TypeBuilder::Debugger::FunctionDetails; -using WebCore::TypeBuilder::Runtime::RemoteObject; - namespace WebCore { InjectedScript::InjectedScript() @@ -82,7 +76,7 @@ void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje makeEvalCall(errorString, function, result, wasThrown); } -void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr* result, bool* wasThrown) +void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr* result, bool* wasThrown) { ScriptFunctionCall function(m_injectedScriptObject, "evaluateOnCallFrame"); function.appendArgument(callFrames); @@ -91,12 +85,10 @@ void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV function.appendArgument(objectGroup); function.appendArgument(includeCommandLineAPI); function.appendArgument(returnByValue); - RefPtr resultRaw; - makeEvalCall(errorString, function, &resultRaw, wasThrown); - *result = RemoteObject::runtimeCast(resultRaw); + makeEvalCall(errorString, function, result, wasThrown); } -void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr* result) +void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr* result) { ScriptFunctionCall function(m_injectedScriptObject, "getFunctionDetails"); function.appendArgument(functionId); @@ -107,7 +99,7 @@ void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& *errorString = "Internal error"; return; } - *result = FunctionDetails::runtimeCast(resultValue); + *result = resultValue->asObject(); } void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, RefPtr* properties) @@ -122,7 +114,7 @@ void InjectedScript::getProperties(ErrorString* errorString, const String& objec *errorString = "Internal error"; return; } - *properties = Array::runtimeCast(result); + *properties = result->asArray(); } Node* InjectedScript::nodeForObjectId(const String& objectId) @@ -149,7 +141,7 @@ void InjectedScript::releaseObject(const String& objectId) } #if ENABLE(JAVASCRIPT_DEBUGGER) -PassRefPtr > InjectedScript::wrapCallFrames(const ScriptValue& callFrames) +PassRefPtr InjectedScript::wrapCallFrames(const ScriptValue& callFrames) { ASSERT(!hasNoValue()); ScriptFunctionCall function(m_injectedScriptObject, "wrapCallFrames"); @@ -159,8 +151,8 @@ PassRefPtr > InjectedScript::wrapCallFrames(const ScriptValue& ASSERT(!hadException); RefPtr result = callFramesValue.toInspectorValue(m_injectedScriptObject.scriptState()); if (result->type() == InspectorValue::TypeArray) - return Array::runtimeCast(result); - return Array::create(); + return result->asArray(); + return InspectorArray::create(); } #endif diff --git a/Source/WebCore/inspector/InjectedScript.h b/Source/WebCore/inspector/InjectedScript.h index 84d9a78..46776fd 100644 --- a/Source/WebCore/inspector/InjectedScript.h +++ b/Source/WebCore/inspector/InjectedScript.h @@ -32,7 +32,6 @@ #define InjectedScript_h #include "InjectedScriptManager.h" -#include "InspectorTypeBuilder.h" #include "ScriptObject.h" #include #include @@ -79,15 +78,15 @@ public: const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, - RefPtr* result, + RefPtr* result, bool* wasThrown); - void getFunctionDetails(ErrorString*, const String& functionId, RefPtr* result); + void getFunctionDetails(ErrorString*, const String& functionId, RefPtr* result); void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr* result); Node* nodeForObjectId(const String& objectId); void releaseObject(const String& objectId); #if ENABLE(JAVASCRIPT_DEBUGGER) - PassRefPtr > wrapCallFrames(const ScriptValue&); + PassRefPtr wrapCallFrames(const ScriptValue&); #endif PassRefPtr wrapObject(ScriptValue, const String& groupName) const; diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp index 6b7e108..742d288 100644 --- a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp +++ b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp @@ -44,11 +44,6 @@ #include "ScriptObject.h" #include -using WebCore::TypeBuilder::Array; -using WebCore::TypeBuilder::Debugger::FunctionDetails; -using WebCore::TypeBuilder::Runtime::RemoteObject; -using WebCore::TypeBuilder::Debugger::CallFrame; - namespace WebCore { namespace DebuggerAgentState { @@ -215,10 +210,8 @@ static bool matches(const String& url, const String& pattern, bool isRegex) return url == pattern; } -void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr& locationsRaw) +void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr& locations) { - RefPtr > locations = Array::create(); - locationsRaw = locations; if (!optionalURL == !optionalURLRegex) { *errorString = "Either url or urlRegex must be specified."; return; @@ -317,7 +310,7 @@ void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const resume(errorString); } -PassRefPtr InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint) +PassRefPtr InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint) { ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); if (scriptIterator == m_scripts.end()) @@ -387,16 +380,14 @@ void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String& s *error = "No script for id: " + scriptId; } -void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr& detailsRaw) +void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr& details) { InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(functionId); if (injectedScript.hasNoValue()) { *errorString = "Inspected frame has gone"; return; } - RefPtr details; injectedScript.getFunctionDetails(errorString, functionId, &details); - detailsRaw = details; } void InspectorDebuggerAgent::schedulePauseOnNextStatement(const String& breakReason, PassRefPtr data) @@ -479,26 +470,24 @@ void InspectorDebuggerAgent::setPauseOnExceptionsImpl(ErrorString* errorString, m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, pauseState); } -void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const returnByValue, RefPtr& resultRaw, bool* wasThrown) +void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const returnByValue, RefPtr& result, bool* wasThrown) { InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(callFrameId); if (injectedScript.hasNoValue()) { *errorString = "Inspected frame has gone"; return; } - RefPtr result; injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : "", includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, &result, wasThrown); - resultRaw = result; } -PassRefPtr > InspectorDebuggerAgent::currentCallFrames() +PassRefPtr InspectorDebuggerAgent::currentCallFrames() { if (!m_pausedScriptState) - return Array::create(); + return InspectorArray::create(); InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m_pausedScriptState); if (injectedScript.hasNoValue()) { ASSERT_NOT_REACHED(); - return Array::create(); + return InspectorArray::create(); } return injectedScript.wrapCallFrames(m_currentCallStack); } @@ -551,7 +540,7 @@ void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script breakpointObject->getNumber("lineNumber", &breakpoint.lineNumber); breakpointObject->getNumber("columnNumber", &breakpoint.columnNumber); breakpointObject->getString("condition", &breakpoint.condition); - RefPtr location = resolveBreakpoint(it->first, scriptId, breakpoint); + RefPtr location = resolveBreakpoint(it->first, scriptId, breakpoint); if (location) m_frontend->breakpointResolved(it->first, location); } diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.h b/Source/WebCore/inspector/InspectorDebuggerAgent.h index a6abfa4..b64fedc 100644 --- a/Source/WebCore/inspector/InspectorDebuggerAgent.h +++ b/Source/WebCore/inspector/InspectorDebuggerAgent.h @@ -130,7 +130,7 @@ private: void disable(); bool enabled(); - PassRefPtr > currentCallFrames(); + PassRefPtr currentCallFrames(); virtual void didParseSource(const String& scriptId, const Script&); virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage); @@ -139,7 +139,7 @@ private: void setPauseOnExceptionsImpl(ErrorString*, int); - PassRefPtr resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&); + PassRefPtr resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&); void clear(); bool assertPaused(ErrorString*); void clearBreakDetails(); -- 2.7.4