Commit 65788ff2 authored by loislo@chromium.org's avatar loislo@chromium.org
Browse files

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
parent 9ec61065
2012-02-17 Ilya Tikhonovsky <loislo@chromium.org>
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 <fmalita@google.com>
 
chrome.dll!WebCore::SVGTRefElement::updateReferencedText ReadAV@NULL (e85cb8e140071fa7790cad215b0109dc)
......@@ -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()
......
......@@ -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<RemoteObject>* 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<InspectorObject>* 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<InspectorObject> resultRaw;
makeEvalCall(errorString, function, &resultRaw, wasThrown);
*result = RemoteObject::runtimeCast(resultRaw);
makeEvalCall(errorString, function, result, wasThrown);
}
void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<FunctionDetails>* result)
void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<InspectorObject>* 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<InspectorArray>* properties)
......@@ -122,7 +114,7 @@ void InjectedScript::getProperties(ErrorString* errorString, const String& objec
*errorString = "Internal error";
return;
}
*properties = Array<PropertyDescriptor>::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<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue& callFrames)
PassRefPtr<InspectorArray> InjectedScript::wrapCallFrames(const ScriptValue& callFrames)
{
ASSERT(!hasNoValue());
ScriptFunctionCall function(m_injectedScriptObject, "wrapCallFrames");
......@@ -159,8 +151,8 @@ PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue&
ASSERT(!hadException);
RefPtr<InspectorValue> result = callFramesValue.toInspectorValue(m_injectedScriptObject.scriptState());
if (result->type() == InspectorValue::TypeArray)
return Array<CallFrame>::runtimeCast(result);
return Array<CallFrame>::create();
return result->asArray();
return InspectorArray::create();
}
#endif
......
......@@ -32,7 +32,6 @@
#define InjectedScript_h
#include "InjectedScriptManager.h"
#include "InspectorTypeBuilder.h"
#include "ScriptObject.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
......@@ -79,15 +78,15 @@ public:
const String& objectGroup,
bool includeCommandLineAPI,
bool returnByValue,
RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
RefPtr<InspectorObject>* result,
bool* wasThrown);
void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>* result);
void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<InspectorObject>* result);
void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr<InspectorArray>* result);
Node* nodeForObjectId(const String& objectId);
void releaseObject(const String& objectId);
#if ENABLE(JAVASCRIPT_DEBUGGER)
PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > wrapCallFrames(const ScriptValue&);
PassRefPtr<InspectorArray> wrapCallFrames(const ScriptValue&);
#endif
PassRefPtr<InspectorObject> wrapObject(ScriptValue, const String& groupName) const;
......
......@@ -44,11 +44,6 @@
#include "ScriptObject.h"
#include <wtf/text/WTFString.h>
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<InspectorArray>& 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<InspectorArray>& locations)
{
RefPtr<Array<TypeBuilder::Debugger::Location> > locations = Array<TypeBuilder::Debugger::Location>::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<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint)
PassRefPtr<InspectorObject> 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<InspectorObject>& detailsRaw)
void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<InspectorObject>& details)
{
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(functionId);
if (injectedScript.hasNoValue()) {
*errorString = "Inspected frame has gone";
return;
}
RefPtr<FunctionDetails> details;
injectedScript.getFunctionDetails(errorString, functionId, &details);
detailsRaw = details;
}
void InspectorDebuggerAgent::schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> 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<InspectorObject>& 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<InspectorObject>& result, bool* wasThrown)
{
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(callFrameId);
if (injectedScript.hasNoValue()) {
*errorString = "Inspected frame has gone";
return;
}
RefPtr<RemoteObject> result;
injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : "", includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, &result, wasThrown);
resultRaw = result;
}
PassRefPtr<Array<CallFrame> > InspectorDebuggerAgent::currentCallFrames()
PassRefPtr<InspectorArray> InspectorDebuggerAgent::currentCallFrames()
{
if (!m_pausedScriptState)
return Array<CallFrame>::create();
return InspectorArray::create();
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m_pausedScriptState);
if (injectedScript.hasNoValue()) {
ASSERT_NOT_REACHED();
return Array<CallFrame>::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<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->first, scriptId, breakpoint);
RefPtr<InspectorObject> location = resolveBreakpoint(it->first, scriptId, breakpoint);
if (location)
m_frontend->breakpointResolved(it->first, location);
}
......
......@@ -130,7 +130,7 @@ private:
void disable();
bool enabled();
PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCallFrames();
PassRefPtr<InspectorArray> 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<TypeBuilder::Debugger::Location> resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&);
PassRefPtr<InspectorObject> resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&);
void clear();
bool assertPaused(ErrorString*);
void clearBreakDetails();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment