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

Unified Diff: src/api.cc

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)
Patch Set: one more test 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/debug/debug.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 062d27e495a341697e99ed4995907e68c844ed51..75cd5e4e4663a8f0e4a01f98504009d6b562da1e 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9042,13 +9042,6 @@ void debug::PrepareStep(Isolate* v8_isolate, StepAction action) {
isolate->debug()->PrepareStep(static_cast<i::StepAction>(action));
}
-void debug::ClearStepping(Isolate* v8_isolate) {
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
- ENTER_V8(isolate);
- // Clear all current stepping setup.
- isolate->debug()->ClearStepping();
-}
-
v8::Isolate* debug::Script::GetIsolate() const {
return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate());
}
@@ -9140,6 +9133,17 @@ bool debug::Script::IsWasm() const {
return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM;
}
+void debug::Script::BlackboxStateChanged() const {
dgozman 2017/01/19 21:49:14 Why doesn't this get a bool parameter |blackboxed|
kozy 2017/01/20 02:32:36 After offline discussion we decided to try to intr
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ i::HandleScope handle_scope(isolate);
+ i::Handle<i::Script> script = Utils::OpenHandle(this);
+ i::SharedFunctionInfo::ScriptIterator iterator(script);
+ for (i::SharedFunctionInfo* info = iterator.Next(); info != nullptr;
+ info = iterator.Next()) {
+ info->set_computed_debug_is_blackboxed(false);
+ }
+}
+
namespace {
int GetSmiValue(i::Handle<i::FixedArray> array, int index) {
return i::Smi::cast(array->get(index))->value();
@@ -9328,6 +9332,24 @@ void debug::SetDebugEventListener(Isolate* v8_isolate,
isolate->debug()->SetDebugEventListener(listener);
}
+void debug::SetIsBlackboxedCallback(Isolate* v8_isolate,
+ IsBlackboxedCallback callback, void* data) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ ENTER_V8(isolate);
+ isolate->debug()->SetIsBlackboxedCallback(callback, data);
+}
+
+bool debug::HasUserFrameOnStack(Isolate* v8_isolate) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ ENTER_V8(isolate);
+ 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;
+}
+
Local<String> CpuProfileNode::GetFunctionName() const {
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
i::Isolate* isolate = node->isolate();
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698