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

Unified Diff: test/cctest/test-api.cc

Issue 1303093004: Fix a segment-fault caused by Value::IntegerValue Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« src/api.cc ('K') | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index c1b5ecec0acdcdc5f6f54de3b8c055744f4ae572..0f1c2e782a500693e23ab31412378cd4f55fbb3a 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -4674,6 +4674,18 @@ THREADED_TEST(isNumberType) {
}
+THREADED_TEST(NoSegmentationFault) {
+ LocalContext env;
+ v8::Isolate* isolate = env->GetIsolate();
+ v8::HandleScope scope(isolate);
+ CompileRun("var obj = {a: 1};");
+ Local<Value> obj = env->Global()->Get(v8_str("obj"));
+
+ int64_t integer_value = obj->IntegerValue();
+ CHECK_EQ(0, integer_value);
+}
+
+
THREADED_TEST(ConversionException) {
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
« src/api.cc ('K') | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698