| Index: src/messages.cc
|
| diff --git a/src/messages.cc b/src/messages.cc
|
| index 3bd60492e34e38ba748042932111a695cdaa9329..9809be58571a1b72800dde7ccc926ca58eb3bb6f 100644
|
| --- a/src/messages.cc
|
| +++ b/src/messages.cc
|
| @@ -354,6 +354,10 @@ bool CallSite::IsEval() {
|
|
|
|
|
| bool CallSite::IsConstructor() {
|
| + // Builtin exit frames mark constructors by passing a special symbol as the
|
| + // receiver.
|
| + Object* ctor_symbol = isolate_->heap()->call_site_constructor_symbol();
|
| + if (*receiver_ == ctor_symbol) return true;
|
| if (!IsJavaScript() || !receiver_->IsJSObject()) return false;
|
| Handle<Object> constructor =
|
| JSReceiver::GetDataProperty(Handle<JSObject>::cast(receiver_),
|
|
|