Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 14294004: Implementing console command 'debug'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index a4ed4ac24136c94849308c457b9bb30ba0e48c12..1e022eeba068c4104a46b79bf4e68cd89603adb4 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -331,6 +331,26 @@ v8::Handle<v8::Value> V8InjectedScriptHost::setFunctionVariableValueMethodCustom
return debugServer.setFunctionVariableValue(functionValue, scopeIndex, variableName, newValue);
}
+v8::Handle<v8::Value> V8InjectedScriptHost::setBreakpointMethodCustom(const v8::Arguments& args)
+{
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+
+ if (args.Length() < 1)
+ return v8::Undefined();
+
+ v8::HandleScope handleScope;
+
+ v8::Handle<v8::Value> value = args[0];
+ if (!value->IsFunction())
+ return v8::Undefined();
+ v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(value);
+ v8::Handle<v8::String> scriptId = function->GetScriptId()->ToString();
+
+ host->setBreakpoint(v8StringToWebCoreString<String>(scriptId, Externalize), function->GetScriptLineNumber(), function->GetScriptColumnNumber());
+
+ return v8::Undefined();
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698