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

Side by Side Diff: src/debug/debug.cc

Issue 2826073004: [serializer/debugger] hide scripts in the snapshot from the debugger. (Closed)
Patch Set: fix Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 // We need to skip top frame which contains instrumentation. 2052 // We need to skip top frame which contains instrumentation.
2053 it.Advance(); 2053 it.Advance();
2054 created_by_user = 2054 created_by_user =
2055 !it.done() && 2055 !it.done() &&
2056 !IsFrameBlackboxed(it.frame()); 2056 !IsFrameBlackboxed(it.frame());
2057 } 2057 }
2058 debug_delegate_->PromiseEventOccurred(type, id, parent_id, created_by_user); 2058 debug_delegate_->PromiseEventOccurred(type, id, parent_id, created_by_user);
2059 } 2059 }
2060 2060
2061 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { 2061 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
2062 if (!script->IsUserJavaScript() && script->type() != i::Script::TYPE_WASM) {
2063 return;
2064 }
2062 // Attach the correct debug id to the script. The debug id is used by the 2065 // Attach the correct debug id to the script. The debug id is used by the
2063 // inspector to filter scripts by native context. 2066 // inspector to filter scripts by native context.
2064 script->set_context_data(isolate_->native_context()->debug_context_id()); 2067 script->set_context_data(isolate_->native_context()->debug_context_id());
2065 if (ignore_events()) return; 2068 if (ignore_events()) return;
2066 if (!script->IsUserJavaScript() && script->type() != i::Script::TYPE_WASM) {
2067 return;
2068 }
2069 if (!debug_delegate_) return; 2069 if (!debug_delegate_) return;
2070 SuppressDebug while_processing(this); 2070 SuppressDebug while_processing(this);
2071 DebugScope debug_scope(this); 2071 DebugScope debug_scope(this);
2072 if (debug_scope.failed()) return; 2072 if (debug_scope.failed()) return;
2073 HandleScope scope(isolate_); 2073 HandleScope scope(isolate_);
2074 PostponeInterruptsScope postpone(isolate_); 2074 PostponeInterruptsScope postpone(isolate_);
2075 DisableBreak no_recursive_break(this); 2075 DisableBreak no_recursive_break(this);
2076 debug_delegate_->ScriptCompiled(ToApiHandle<debug::Script>(script), 2076 debug_delegate_->ScriptCompiled(ToApiHandle<debug::Script>(script),
2077 event != v8::AfterCompile); 2077 event != v8::AfterCompile);
2078 } 2078 }
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 isolate_->Throw(*isolate_->factory()->NewEvalError( 2492 isolate_->Throw(*isolate_->factory()->NewEvalError(
2493 MessageTemplate::kNoSideEffectDebugEvaluate)); 2493 MessageTemplate::kNoSideEffectDebugEvaluate));
2494 } 2494 }
2495 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); 2495 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_);
2496 isolate_->debug()->UpdateHookOnFunctionCall(); 2496 isolate_->debug()->UpdateHookOnFunctionCall();
2497 isolate_->debug()->side_effect_check_failed_ = false; 2497 isolate_->debug()->side_effect_check_failed_ = false;
2498 } 2498 }
2499 2499
2500 } // namespace internal 2500 } // namespace internal
2501 } // namespace v8 2501 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698