Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: src/messages.cc

Issue 2106883003: [builtins] Add receiver to builtin exit frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/messages.js ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_),
« no previous file with comments | « src/js/messages.js ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698