Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index df134ed4b838cce83d6135f0106780e33f59d705..4b673f1a920f2381bd161a90291fba7f3387eee9 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -433,9 +433,18 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object, |
| int offset = |
| static_cast<int>(exit_frame->pc() - code->instruction_start()); |
| - // For now, builtin exit frames do not pass along a receiver. |
| + // CallSite::IsConstructor does not correctly detect builtin |
|
Yang
2016/06/30 12:34:23
Isn't this comment outdated now that you actually
jgruber
2016/06/30 14:40:29
Done.
|
| + // constructors. Instead, we reuse the receiver field to pass along a |
| + // special symbol marking builtin constructors. |
| + Handle<Object> recv; |
| + if (exit_frame->IsConstructor()) { |
| + recv = handle(heap()->call_site_constructor_symbol(), this); |
| + } else { |
| + recv = handle(exit_frame->receiver(), this); |
| + } |
| + |
| elements = MaybeGrow(this, elements, cursor, cursor + 4); |
| - elements->set(cursor++, *factory()->undefined_value()); |
| + elements->set(cursor++, *recv); |
| elements->set(cursor++, *fun); |
| elements->set(cursor++, *code); |
| elements->set(cursor++, Smi::FromInt(offset)); |