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

Unified Diff: src/debug-debugger.js

Issue 355793002: Do not unnecessarily expose execution state in debug event data. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/debug.cc ('k') | no next file » | 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 660ea790389ae4e828681fe786683ee0f3a7a3a4..aa370f0c3ea99fc9cecd88fcead1b00dd2cbcdc8 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -986,44 +986,39 @@ ExecutionState.prototype.debugCommandProcessor = function(opt_is_running) {
};
-function MakeBreakEvent(exec_state, break_points_hit) {
- return new BreakEvent(exec_state, break_points_hit);
+function MakeBreakEvent(break_id, break_points_hit) {
+ return new BreakEvent(break_id, break_points_hit);
}
-function BreakEvent(exec_state, break_points_hit) {
- this.exec_state_ = exec_state;
+function BreakEvent(break_id, break_points_hit) {
+ this.frame_ = new FrameMirror(break_id, 0);
this.break_points_hit_ = break_points_hit;
}
-BreakEvent.prototype.executionState = function() {
- return this.exec_state_;
-};
-
-
BreakEvent.prototype.eventType = function() {
return Debug.DebugEvent.Break;
};
BreakEvent.prototype.func = function() {
- return this.exec_state_.frame(0).func();
+ return this.frame_.func();
};
BreakEvent.prototype.sourceLine = function() {
- return this.exec_state_.frame(0).sourceLine();
+ return this.frame_.sourceLine();
};
BreakEvent.prototype.sourceColumn = function() {
- return this.exec_state_.frame(0).sourceColumn();
+ return this.frame_.sourceColumn();
};
BreakEvent.prototype.sourceLineText = function() {
- return this.exec_state_.frame(0).sourceLineText();
+ return this.frame_.sourceLineText();
};
@@ -1036,8 +1031,7 @@ BreakEvent.prototype.toJSONProtocol = function() {
var o = { seq: next_response_seq++,
type: "event",
event: "break",
- body: { invocationText: this.exec_state_.frame(0).invocationText(),
- }
+ body: { invocationText: this.frame_.invocationText() }
};
// Add script related information to the event if available.
@@ -1070,24 +1064,19 @@ BreakEvent.prototype.toJSONProtocol = function() {
};
-function MakeExceptionEvent(exec_state, exception, uncaught, promise) {
- return new ExceptionEvent(exec_state, exception, uncaught, promise);
+function MakeExceptionEvent(break_id, exception, uncaught, promise) {
+ return new ExceptionEvent(break_id, exception, uncaught, promise);
}
-function ExceptionEvent(exec_state, exception, uncaught, promise) {
- this.exec_state_ = exec_state;
+function ExceptionEvent(break_id, exception, uncaught, promise) {
+ this.exec_state_ = new ExecutionState(break_id);
this.exception_ = exception;
this.uncaught_ = uncaught;
this.promise_ = promise;
}
-ExceptionEvent.prototype.executionState = function() {
- return this.exec_state_;
-};
-
-
ExceptionEvent.prototype.eventType = function() {
return Debug.DebugEvent.Exception;
};
@@ -1154,23 +1143,17 @@ ExceptionEvent.prototype.toJSONProtocol = function() {
};
-function MakeCompileEvent(exec_state, script, before) {
- return new CompileEvent(exec_state, script, before);
+function MakeCompileEvent(script, before) {
+ return new CompileEvent(script, before);
}
-function CompileEvent(exec_state, script, before) {
- this.exec_state_ = exec_state;
+function CompileEvent(script, before) {
this.script_ = MakeMirror(script);
this.before_ = before;
}
-CompileEvent.prototype.executionState = function() {
- return this.exec_state_;
-};
-
-
CompileEvent.prototype.eventType = function() {
if (this.before_) {
return Debug.DebugEvent.BeforeCompile;
@@ -1200,13 +1183,12 @@ CompileEvent.prototype.toJSONProtocol = function() {
};
-function MakeScriptCollectedEvent(exec_state, id) {
- return new ScriptCollectedEvent(exec_state, id);
+function MakeScriptCollectedEvent(id) {
+ return new ScriptCollectedEvent(id);
}
-function ScriptCollectedEvent(exec_state, id) {
- this.exec_state_ = exec_state;
+function ScriptCollectedEvent(id) {
this.id_ = id;
}
@@ -1216,11 +1198,6 @@ ScriptCollectedEvent.prototype.id = function() {
};
-ScriptCollectedEvent.prototype.executionState = function() {
- return this.exec_state_;
-};
-
-
ScriptCollectedEvent.prototype.toJSONProtocol = function() {
var o = new ProtocolMessage();
o.running = true;
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698