Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index afd3803e42cf10dd8b08505685906dfd237e27da..af49a159630b1b61a41cb1205570afa8ffb1cb9a 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -396,6 +396,11 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object, |
for (int i = frames.length() - 1; i >= 0; i--) { |
Handle<JSFunction> fun = frames[i].function(); |
Handle<Object> recv = frames[i].receiver(); |
+ if (frame->type() == StackFrame::BUILTIN && fun->IsConstructor()) { |
+ // Help CallSite::IsConstructor to properly detect constructors |
+ // implemented in assembler. |
+ recv = handle(heap()->call_site_constructor_symbol(), this); |
+ } |
// Filter out internal frames that we do not want to show. |
if (!IsVisibleInStackTrace(*fun, *caller, &seen_caller)) continue; |
// Filter out frames from other security contexts. |