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

Unified Diff: src/objects-inl.h

Issue 2505493002: [inspector] make console.assert much faster (Closed)
Patch Set: Created 4 years, 1 month 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
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();
+ 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();
}
bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {

Powered by Google App Engine
This is Rietveld 408576698