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

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

Issue 28068: Fixed regression http://code.google.com/p/v8/issues/detail?id=236. (Closed)
Patch Set: Created 11 years, 10 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/objects.cc ('K') | « src/objects.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-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 6bfd53b3554ae3ee30d3295dd57570efcee7f8eb..b4da9d55378754f151994f0c24a1749dff1fd9f6 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -302,3 +302,17 @@ TEST(C2JSFrames) {
&has_pending_exception);
CHECK(!has_pending_exception);
}
+
+
+// Regression 236. Calling InitLineEnds on a Script with undefined
+// source resulted in crash.
+TEST(Regression236) {
+ InitializeVM();
+ v8::HandleScope scope;
+
+ Handle<Script> script = Factory::NewScript(Factory::empty_string());
+ script->set_source(Heap::undefined_value());
+ CHECK_EQ(-1, script->GetLineNumber(0));
+ CHECK_EQ(-1, script->GetLineNumber(100));
+ CHECK_EQ(-1, script->GetLineNumber(-1));
Søren Thygesen Gjesse 2009/02/24 13:23:52 As this bug originated from Chrome where source is
Mikhail Naganov 2009/02/24 13:41:01 Ok, will add such test. But it will be a new CL si
+}
« src/objects.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698