summaryrefslogtreecommitdiff
path: root/deps/v8/src/d8.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-05-21 09:41:50 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-05-21 09:41:50 -0700
commit2b34363d03e0718c9e9f39982c723b806558c759 (patch)
tree0388b89e7794e3aa7c9ee2e923570cca56c7def9 /deps/v8/src/d8.js
parent9514a4d5476225e8c8310ce5acae2857033bcaaa (diff)
downloadnode-2b34363d03e0718c9e9f39982c723b806558c759.tar.gz
Upgrade V8 to 2.2.11
Diffstat (limited to 'deps/v8/src/d8.js')
-rw-r--r--deps/v8/src/d8.js57
1 files changed, 55 insertions, 2 deletions
diff --git a/deps/v8/src/d8.js b/deps/v8/src/d8.js
index b9ff09cee..5c3da13a6 100644
--- a/deps/v8/src/d8.js
+++ b/deps/v8/src/d8.js
@@ -341,6 +341,11 @@ function DebugRequest(cmd_line) {
this.request_ = this.breakCommandToJSONRequest_(args);
break;
+ case 'breakpoints':
+ case 'bb':
+ this.request_ = this.breakpointsCommandToJSONRequest_(args);
+ break;
+
case 'clear':
this.request_ = this.clearCommandToJSONRequest_(args);
break;
@@ -770,6 +775,15 @@ DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
};
+DebugRequest.prototype.breakpointsCommandToJSONRequest_ = function(args) {
+ if (args && args.length > 0) {
+ throw new Error('Unexpected arguments.');
+ }
+ var request = this.createRequest('listbreakpoints');
+ return request.toJSONProtocol();
+};
+
+
// Create a JSON request for the clear command.
DebugRequest.prototype.clearCommandToJSONRequest_ = function(args) {
// Build a evaluate request from the text command.
@@ -947,6 +961,39 @@ function DebugResponseDetails(response) {
result += body.breakpoint;
details.text = result;
break;
+
+ case 'listbreakpoints':
+ result = 'breakpoints: (' + body.breakpoints.length + ')';
+ for (var i = 0; i < body.breakpoints.length; i++) {
+ var breakpoint = body.breakpoints[i];
+ result += '\n id=' + breakpoint.number;
+ result += ' type=' + breakpoint.type;
+ if (breakpoint.script_id) {
+ result += ' script_id=' + breakpoint.script_id;
+ }
+ if (breakpoint.script_name) {
+ result += ' script_name=' + breakpoint.script_name;
+ }
+ result += ' line=' + breakpoint.line;
+ if (breakpoint.column != null) {
+ result += ' column=' + breakpoint.column;
+ }
+ if (breakpoint.groupId) {
+ result += ' groupId=' + breakpoint.groupId;
+ }
+ if (breakpoint.ignoreCount) {
+ result += ' ignoreCount=' + breakpoint.ignoreCount;
+ }
+ if (breakpoint.active === false) {
+ result += ' inactive';
+ }
+ if (breakpoint.condition) {
+ result += ' condition=' + breakpoint.condition;
+ }
+ result += ' hit_count=' + breakpoint.hit_count;
+ }
+ details.text = result;
+ break;
case 'backtrace':
if (body.totalFrames == 0) {
@@ -1136,8 +1183,8 @@ function DebugResponseDetails(response) {
default:
details.text =
- 'Response for unknown command \'' + response.command + '\'' +
- ' (' + json_response + ')';
+ 'Response for unknown command \'' + response.command() + '\'' +
+ ' (' + response.raw_json() + ')';
}
} catch (e) {
details.text = 'Error: "' + e + '" formatting response';
@@ -1153,6 +1200,7 @@ function DebugResponseDetails(response) {
* @constructor
*/
function ProtocolPackage(json) {
+ this.raw_json_ = json;
this.packet_ = JSON.parse(json);
this.refs_ = [];
if (this.packet_.refs) {
@@ -1243,6 +1291,11 @@ ProtocolPackage.prototype.lookup = function(handle) {
}
+ProtocolPackage.prototype.raw_json = function() {
+ return this.raw_json_;
+}
+
+
function ProtocolValue(value, packet) {
this.value_ = value;
this.packet_ = packet;