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

Unified Diff: src/messages.cc

Issue 1510833003: Improve the CallSite constructor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/messages.h ('k') | test/mjsunit/callsite.js » ('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 7950ad814db5502f90c015005eb0d80d01f0d324..0e7b22d035741c962ba6cbaecfe45ed1421ad055 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -151,10 +151,9 @@ CallSite::CallSite(Isolate* isolate, Handle<JSObject> call_site_obj)
fun_ = Handle<JSFunction>::cast(maybe_function);
receiver_ = JSObject::GetDataProperty(
call_site_obj, isolate->factory()->call_site_receiver_symbol());
- pos_ = Handle<Smi>::cast(JSObject::GetDataProperty(
- call_site_obj,
- isolate->factory()->call_site_position_symbol()))
- ->value();
+ CHECK(JSObject::GetDataProperty(
+ call_site_obj, isolate->factory()->call_site_position_symbol())
+ ->ToInt32(&pos_));
}
« no previous file with comments | « src/messages.h ('k') | test/mjsunit/callsite.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698