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

Unified Diff: src/objects-inl.h

Issue 1227213003: Debugger: ensure that functions with debug info have code with break slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/objects.h ('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 b21724583d879df280080fd49a5e50655d24ce9a..c5f7a2c5d9e705cdd83454a0e65455c2b3a79100 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5565,29 +5565,22 @@ void SharedFunctionInfo::TryReenableOptimization() {
}
-bool JSFunction::IsBuiltin() {
- return context()->global_object()->IsJSBuiltinsObject();
+bool SharedFunctionInfo::IsSubjectToDebugging() {
+ Object* script_obj = script();
+ if (script_obj->IsUndefined()) return false;
+ Script* script = Script::cast(script_obj);
+ Script::Type type = static_cast<Script::Type>(script->type()->value());
+ return type == Script::TYPE_NORMAL;
}
-bool JSFunction::IsFromNativeScript() {
- Object* script = shared()->script();
- bool native = script->IsScript() &&
- Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
- DCHECK(!IsBuiltin() || native); // All builtins are also native.
- return native;
-}
-
-
-bool JSFunction::IsFromExtensionScript() {
- Object* script = shared()->script();
- return script->IsScript() &&
- Script::cast(script)->type()->value() == Script::TYPE_EXTENSION;
+bool JSFunction::IsBuiltin() {
+ return context()->global_object()->IsJSBuiltinsObject();
}
bool JSFunction::IsSubjectToDebugging() {
- return !IsFromNativeScript() && !IsFromExtensionScript();
+ return shared()->IsSubjectToDebugging();
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698