Commit 013bb22c authored by yurys@chromium.org's avatar yurys@chromium.org

Remove unused Debug::AfterCompileFlags flags.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/353823004

Patch from Alexey Kozyatinskiy <kozyatinskiy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 310c37bd
...@@ -860,7 +860,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { ...@@ -860,7 +860,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
live_edit_tracker.RecordFunctionInfo(result, lit, info->zone()); live_edit_tracker.RecordFunctionInfo(result, lit, info->zone());
} }
isolate->debug()->OnAfterCompile(script, Debug::NO_AFTER_COMPILE_FLAGS); isolate->debug()->OnAfterCompile(script);
return result; return result;
} }
......
...@@ -2647,8 +2647,7 @@ void Debug::OnBeforeCompile(Handle<Script> script) { ...@@ -2647,8 +2647,7 @@ void Debug::OnBeforeCompile(Handle<Script> script) {
// Handle debugger actions when a new script is compiled. // Handle debugger actions when a new script is compiled.
void Debug::OnAfterCompile(Handle<Script> script, void Debug::OnAfterCompile(Handle<Script> script) {
AfterCompileFlags after_compile_flags) {
// Add the newly compiled script to the script cache. // Add the newly compiled script to the script cache.
if (script_cache_ != NULL) script_cache_->Add(script); if (script_cache_ != NULL) script_cache_->Add(script);
...@@ -2656,9 +2655,6 @@ void Debug::OnAfterCompile(Handle<Script> script, ...@@ -2656,9 +2655,6 @@ void Debug::OnAfterCompile(Handle<Script> script,
if (in_debug_scope() || ignore_events()) return; if (in_debug_scope() || ignore_events()) return;
HandleScope scope(isolate_); HandleScope scope(isolate_);
// Store whether in debugger before entering debugger.
bool was_in_scope = in_debug_scope();
DebugScope debug_scope(this); DebugScope debug_scope(this);
if (debug_scope.failed()) return; if (debug_scope.failed()) return;
...@@ -2690,8 +2686,6 @@ void Debug::OnAfterCompile(Handle<Script> script, ...@@ -2690,8 +2686,6 @@ void Debug::OnAfterCompile(Handle<Script> script,
argv).is_null()) { argv).is_null()) {
return; return;
} }
// Bail out based on state or if there is no listener for this event
if (was_in_scope && (after_compile_flags & SEND_WHEN_DEBUGGING) == 0) return;
// Create the compile state object. // Create the compile state object.
Handle<Object> event_data; Handle<Object> event_data;
......
...@@ -364,17 +364,11 @@ class PromiseOnStack { ...@@ -364,17 +364,11 @@ class PromiseOnStack {
// DebugInfo. // DebugInfo.
class Debug { class Debug {
public: public:
enum AfterCompileFlags {
NO_AFTER_COMPILE_FLAGS,
SEND_WHEN_DEBUGGING
};
// Debug event triggers. // Debug event triggers.
void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue);
void OnException(Handle<Object> exception, bool uncaught); void OnException(Handle<Object> exception, bool uncaught);
void OnBeforeCompile(Handle<Script> script); void OnBeforeCompile(Handle<Script> script);
void OnAfterCompile(Handle<Script> script, void OnAfterCompile(Handle<Script> script);
AfterCompileFlags after_compile_flags);
void OnScriptCollected(int id); void OnScriptCollected(int id);
// API facing. // API facing.
......
...@@ -1477,7 +1477,7 @@ Handle<Object> LiveEdit::ChangeScriptSource(Handle<Script> original_script, ...@@ -1477,7 +1477,7 @@ Handle<Object> LiveEdit::ChangeScriptSource(Handle<Script> original_script,
Handle<Script> old_script = CreateScriptCopy(original_script); Handle<Script> old_script = CreateScriptCopy(original_script);
old_script->set_name(String::cast(*old_script_name)); old_script->set_name(String::cast(*old_script_name));
old_script_object = old_script; old_script_object = old_script;
isolate->debug()->OnAfterCompile(old_script, Debug::SEND_WHEN_DEBUGGING); isolate->debug()->OnAfterCompile(old_script);
} else { } else {
old_script_object = isolate->factory()->null_value(); old_script_object = isolate->factory()->null_value();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment