summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/bindings/v8/ScriptDebugServer.cpp
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/bindings/v8/ScriptDebugServer.cpp')
-rw-r--r--Source/WebCore/bindings/v8/ScriptDebugServer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/WebCore/bindings/v8/ScriptDebugServer.cpp b/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
index 5758639..a0e14f3 100644
--- a/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
@@ -67,11 +67,10 @@ String ScriptDebugServer::setBreakpoint(const String& sourceID, const ScriptBrea
v8::Context::Scope contextScope(debuggerContext);
v8::Local<v8::Object> args = v8::Object::New();
- args->Set(v8::String::New("scriptId"), v8String(sourceID));
+ args->Set(v8::String::New("sourceID"), v8String(sourceID));
args->Set(v8::String::New("lineNumber"), v8::Integer::New(scriptBreakpoint.lineNumber));
args->Set(v8::String::New("columnNumber"), v8::Integer::New(scriptBreakpoint.columnNumber));
args->Set(v8::String::New("condition"), v8String(scriptBreakpoint.condition));
- args->Set(v8::String::New("enabled"), v8::Boolean::New(scriptBreakpoint.enabled));
v8::Handle<v8::Function> setBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setBreakpoint")));
v8::Handle<v8::Value> breakpointId = v8::Debug::Call(setBreakpointFunction, args);
@@ -212,7 +211,7 @@ void ScriptDebugServer::stepOutOfFunction()
continueProgram();
}
-bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& newContent, String& newSourceOrErrorMessage)
+bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& newContent, String* error)
{
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
@@ -230,11 +229,12 @@ bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& n
if (tryCatch.HasCaught()) {
v8::Local<v8::Message> message = tryCatch.Message();
if (!message.IsEmpty())
- newSourceOrErrorMessage = toWebCoreStringWithNullOrUndefinedCheck(message->Get());
+ *error = toWebCoreStringWithNullOrUndefinedCheck(message->Get());
+ else
+ *error = "Unknown error.";
return false;
}
ASSERT(!result.IsEmpty());
- newSourceOrErrorMessage = toWebCoreStringWithNullOrUndefinedCheck(result);
// Call stack may have changed after if the edited function was on the stack.
if (m_currentCallFrame)
@@ -351,7 +351,7 @@ void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8
toWebCoreStringWithNullOrUndefinedCheck(object->Get(v8::String::New("source"))),
object->Get(v8::String::New("lineOffset"))->ToInteger()->Value(),
object->Get(v8::String::New("columnOffset"))->ToInteger()->Value(),
- static_cast<ScriptWorldType>(object->Get(v8::String::New("scriptWorldType"))->Int32Value()));
+ object->Get(v8::String::New("isContentScript"))->ToBoolean()->Value());
}
void ScriptDebugServer::ensureDebuggerScriptCompiled()