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

Unified Diff: src/debug.cc

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 | « 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/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 58c0e44c7997cd79b3fab0d87cf16135622b0730..cf5cf435d42f1c53b14fe5097dec4f12ac770e10 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2534,10 +2534,9 @@ MaybeHandle<Object> Debug::MakeExecutionState() {
MaybeHandle<Object> Debug::MakeBreakEvent(Handle<Object> break_points_hit) {
- Handle<Object> exec_state;
- if (!MakeExecutionState().ToHandle(&exec_state)) return MaybeHandle<Object>();
// Create the new break event object.
- Handle<Object> argv[] = { exec_state, break_points_hit };
+ Handle<Object> argv[] = { isolate_->factory()->NewNumberFromInt(break_id()),
+ break_points_hit };
return MakeJSObject("MakeBreakEvent", ARRAY_SIZE(argv), argv);
}
@@ -2545,10 +2544,8 @@ MaybeHandle<Object> Debug::MakeBreakEvent(Handle<Object> break_points_hit) {
MaybeHandle<Object> Debug::MakeExceptionEvent(Handle<Object> exception,
bool uncaught,
Handle<Object> promise) {
- Handle<Object> exec_state;
- if (!MakeExecutionState().ToHandle(&exec_state)) return MaybeHandle<Object>();
// Create the new exception event object.
- Handle<Object> argv[] = { exec_state,
+ Handle<Object> argv[] = { isolate_->factory()->NewNumberFromInt(break_id()),
exception,
isolate_->factory()->ToBoolean(uncaught),
promise };
@@ -2558,23 +2555,18 @@ MaybeHandle<Object> Debug::MakeExceptionEvent(Handle<Object> exception,
MaybeHandle<Object> Debug::MakeCompileEvent(Handle<Script> script,
bool before) {
- Handle<Object> exec_state;
- if (!MakeExecutionState().ToHandle(&exec_state)) return MaybeHandle<Object>();
// Create the compile event object.
Handle<Object> script_wrapper = Script::GetWrapper(script);
- Handle<Object> argv[] = { exec_state,
- script_wrapper,
+ Handle<Object> argv[] = { script_wrapper,
isolate_->factory()->ToBoolean(before) };
return MakeJSObject("MakeCompileEvent", ARRAY_SIZE(argv), argv);
}
MaybeHandle<Object> Debug::MakeScriptCollectedEvent(int id) {
- Handle<Object> exec_state;
- if (!MakeExecutionState().ToHandle(&exec_state)) return MaybeHandle<Object>();
// Create the script collected event object.
Handle<Object> id_object = Handle<Smi>(Smi::FromInt(id), isolate_);
- Handle<Object> argv[] = { exec_state, id_object };
+ Handle<Object> argv[] = { id_object };
return MakeJSObject("MakeScriptCollectedEvent", ARRAY_SIZE(argv), argv);
}
« 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