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

Unified Diff: src/api.cc

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)
Patch Set: fixed tests Created 3 years, 11 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/debug.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 2ef82dcb73bc184c5adeb20247de0d3ac9a45077..e9c01a2ff26337a7330bc83811024aa799ac2b64 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9050,11 +9050,15 @@ void debug::PrepareStep(Isolate* v8_isolate, StepAction action) {
isolate->debug()->PrepareStep(static_cast<i::StepAction>(action));
}
-void debug::ClearStepping(Isolate* v8_isolate) {
+bool debug::HasNonBlackboxedFrameOnStack(Isolate* v8_isolate) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
ENTER_V8(isolate);
- // Clear all current stepping setup.
- isolate->debug()->ClearStepping();
+ for (i::StackTraceFrameIterator it(isolate); !it.done(); it.Advance()) {
+ if (!it.is_javascript()) continue;
+ if (!it.javascript_frame()->function()->shared()->DebugIsBlackboxed())
+ return true;
+ }
+ return false;
}
v8::Isolate* debug::Script::GetIsolate() const {
@@ -9329,11 +9333,22 @@ MaybeLocal<UnboundScript> debug::CompileInspectorScript(Isolate* v8_isolate,
RETURN_ESCAPED(ToApiHandle<UnboundScript>(result));
}
-void debug::SetDebugEventListener(Isolate* v8_isolate,
- debug::DebugEventListener* listener) {
+void debug::SetDebugDelegate(Isolate* v8_isolate,
+ debug::DebugDelegate* delegate) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ ENTER_V8(isolate);
+ isolate->debug()->SetDebugDelegate(delegate);
+}
+
+void debug::ResetBlackboxedStateCache(Isolate* v8_isolate,
+ v8::Local<debug::Script> script) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
ENTER_V8(isolate);
- isolate->debug()->SetDebugEventListener(listener);
+ i::DisallowHeapAllocation no_gc;
+ i::SharedFunctionInfo::ScriptIterator iter(Utils::OpenHandle(*script));
+ while (i::SharedFunctionInfo* info = iter.Next()) {
+ info->set_computed_debug_is_blackboxed(false);
+ }
}
Local<String> CpuProfileNode::GetFunctionName() const {
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698