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

Unified Diff: src/debug-debugger.js

Issue 1800007: LiveEdit: breakpoints updates and fixes for related problems (Closed)
Patch Set: follow codereview Created 10 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
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index a0f3bdc5ac04239624b7c5d7cc448e55e6ae57cd..075189543ecaba3800bad3280634090fa5259709 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -124,12 +124,6 @@ BreakPoint.prototype.source_position = function() {
};
-BreakPoint.prototype.updateSourcePosition = function(new_position, script) {
- this.source_position_ = new_position;
- // TODO(635): also update line and column.
-};
-
-
BreakPoint.prototype.hit_count = function() {
return this.hit_count_;
};
@@ -245,6 +239,21 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
}
+//Creates a clone of script breakpoint that is linked to another script.
+ScriptBreakPoint.prototype.cloneForOtherScript = function (other_script) {
+ var copy = new ScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
+ other_script.id, this.line_, this.column_, this.groupId_);
+ copy.number_ = next_break_point_number++;
+ script_break_points.push(copy);
+
+ copy.hit_count_ = this.hit_count_;
+ copy.active_ = this.active_;
+ copy.condition_ = this.condition_;
+ copy.ignoreCount_ = this.ignoreCount_;
+ return copy;
+}
+
+
ScriptBreakPoint.prototype.number = function() {
return this.number_;
};
@@ -280,6 +289,13 @@ ScriptBreakPoint.prototype.column = function() {
};
+ScriptBreakPoint.prototype.update_positions = function(line, column) {
+ this.line_ = line;
+ this.column_ = column;
+}
+
+
+
ScriptBreakPoint.prototype.hit_count = function() {
return this.hit_count_;
};
@@ -406,6 +422,17 @@ function UpdateScriptBreakPoints(script) {
}
+function GetScriptBreakPoints(script) {
+ var result = [];
+ for (var i = 0; i < script_break_points.length; i++) {
+ if (script_break_points[i].matchesScript(script)) {
+ result.push(script_break_points[i]);
+ }
+ }
+ return result;
+}
+
+
Debug.setListener = function(listener, opt_data) {
if (!IS_FUNCTION(listener) && !IS_UNDEFINED(listener) && !IS_NULL(listener)) {
throw new Error('Parameters have wrong types.');
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698