Chromium Code Reviews

Unified Diff: src/objects-inl.h

Issue 2499093003: [inspector] don't report frames for v8-debugger internal scripts (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« src/isolate.cc ('K') | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 9100c114141cab10af5f74f4d8b3f98c9504cea5..a82aa825b99d2e1a831e3991654d21c1e9087707 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6507,7 +6507,12 @@ bool SharedFunctionInfo::IsBuiltin() {
}
bool SharedFunctionInfo::IsSubjectToDebugging() {
- return !IsBuiltin() && !HasAsmWasmData();
+ bool result = !IsBuiltin() && !HasAsmWasmData();
Yang 2016/11/15 08:15:47 Can we combine these two lines to if (IsBuiltin()
+ if (!result) return false;
+ Object* script_obj = script();
+ if (script_obj->IsUndefined(GetIsolate())) return true;
+ Script* script = Script::cast(script_obj);
+ return !script->origin_options().IsEmbedderDebugScript();
Yang 2016/11/15 08:15:47 I think we should get rid of this origin_option, a
}
bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
« src/isolate.cc ('K') | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine