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

Unified Diff: src/d8.js

Issue 7200024: Issue 1418: Debug: extends setBreakpoint API to accept partial script name as a parameter (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: follow codereview Created 9 years, 6 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
« no previous file with comments | « no previous file | src/debug-debugger.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.js
diff --git a/src/d8.js b/src/d8.js
index 979807888e66c779c782dd458378973318b38955..033455e9df94e29349f3e229c9ef16ab47b7ca30 100644
--- a/src/d8.js
+++ b/src/d8.js
@@ -977,9 +977,14 @@ DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
// specification it is considered a function break point.
pos = target.indexOf(':');
if (pos > 0) {
- type = 'script';
var tmp = target.substring(pos + 1, target.length);
target = target.substring(0, pos);
+ if (target[0] == '/' && target[target.length - 1] == '/') {
+ type = 'scriptRegExp';
+ target = target.substring(1, target.length - 1);
+ } else {
+ type = 'script';
+ }
// Check for both line and column.
pos = tmp.indexOf(':');
@@ -1984,6 +1989,9 @@ function DebugResponseDetails(response) {
if (breakpoint.script_name) {
result += ' script_name=' + breakpoint.script_name;
}
+ if (breakpoint.script_regexp) {
+ result += ' script_regexp=' + breakpoint.script_regexp;
+ }
result += ' line=' + (breakpoint.line + 1);
if (breakpoint.column != null) {
result += ' column=' + (breakpoint.column + 1);
« no previous file with comments | « no previous file | src/debug-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698