Chromium Code Reviews| 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 { |