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

Unified Diff: src/api.cc

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)
Patch Set: rebased 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/compiler.cc » ('j') | src/compiler.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 a2cfe61a8d7464cf7cd139a77c5279606bdc7322..83ed3933ac0524e7e3e96c42dca806966243c10c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9039,13 +9039,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());
}
@@ -9137,6 +9130,21 @@ bool debug::Script::IsWasm() const {
return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM;
}
+void debug::Script::BlackboxStateChanged() const {
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ i::HandleScope handle_scope(isolate);
+ i::Handle<i::Script> script = Utils::OpenHandle(this);
+ i::List<i::Handle<i::SharedFunctionInfo>> infos;
+ i::SharedFunctionInfo::ScriptIterator iterator(script);
+ for (i::SharedFunctionInfo* info = iterator.Next(); info != nullptr;
+ info = iterator.Next()) {
+ infos.Add(i::handle(info));
+ }
+ for (int i = 0; i < infos.length(); ++i) {
+ isolate->debug()->OnNewSharedFunctionInfo(infos[i]);
+ }
+}
+
namespace {
int GetSmiValue(i::Handle<i::FixedArray> array, int index) {
return i::Smi::cast(array->get(index))->value();
@@ -9325,6 +9333,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()->debug_is_blackboxed())
+ 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/compiler.cc » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698