Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index a4ca8c34e29eeec8737c7f0b3025952c319b54cd..1f73c74aebea09e4fadfbae211e95941039adf90 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -5476,7 +5476,7 @@ bool SharedFunctionInfo::is_simple_parameter_list() { |
| bool SharedFunctionInfo::HasDebugInfo() { |
| - bool has_debug_info = debug_info()->IsStruct(); |
| + bool has_debug_info = !IsApiFunction() && debug_info()->IsStruct(); |
|
Jakob Kummerow
2015/07/22 12:24:02
I can haz DCHECK(!IsApiFunction()) inside debug_in
|
| DCHECK(!has_debug_info || HasDebugCode()); |
| return has_debug_info; |
| } |
| @@ -5590,6 +5590,7 @@ void SharedFunctionInfo::TryReenableOptimization() { |
| bool SharedFunctionInfo::IsSubjectToDebugging() { |
| + if (IsApiFunction()) return false; |
| Object* script_obj = script(); |
| if (script_obj->IsUndefined()) return false; |
| Script* script = Script::cast(script_obj); |