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
|
+} |