Index: src/profiler/profile-generator.cc |
diff --git a/src/profiler/profile-generator.cc b/src/profiler/profile-generator.cc |
index 8d2d614adf8b34bb0e896fc0b33b602cf11d26f9..890f341e895b10f5b645417b75b3b2208f2d3948 100644 |
--- a/src/profiler/profile-generator.cc |
+++ b/src/profiler/profile-generator.cc |
@@ -619,11 +619,12 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) { |
src_line_not_found = false; |
*entry++ = pc_entry; |
- if (pc_entry->builtin_id() == Builtins::kFunctionCall || |
- pc_entry->builtin_id() == Builtins::kFunctionApply) { |
- // When current function is FunctionCall or FunctionApply builtin the |
- // top frame is either frame of the calling JS function or internal |
- // frame. In the latter case we know the caller for sure but in the |
+ if (pc_entry->builtin_id() == Builtins::kFunctionPrototypeApply || |
+ pc_entry->builtin_id() == Builtins::kFunctionPrototypeCall) { |
+ // When current function is either the Function.prototype.apply or the |
+ // Function.prototype.call builtin the top frame is either frame of |
+ // the calling JS function or internal frame. |
+ // In the latter case we know the caller for sure but in the |
// former case we don't so we simply replace the frame with |
// 'unresolved' entry. |
if (sample.top_frame_type == StackFrame::JAVA_SCRIPT) { |