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

Unified Diff: src/objects.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
« no previous file with comments | « no previous file | test/cctest/test-compiler.cc » ('j') | test/cctest/test-compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 20b71391bad31a8bb8a83ad3a86dad814b102ea4..9876a61935d2a98588c9b22561e078c4701a1189 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6859,6 +6859,12 @@ Object* Dictionary::TransformPropertiesToFastFor(JSObject* obj,
void Script::InitLineEnds() {
if (!line_ends()->IsUndefined()) return;
+ if (source()->IsUndefined()) {
+ set_line_ends(*(Factory::NewArrayLiteral(0)));
Søren Thygesen Gjesse 2009/02/24 13:23:52 Please use NewJSArray.
Mikhail Naganov 2009/02/24 13:41:01 Um, but 'NewArrayLiteral' uses NewJSArrayWithEleme
+ ASSERT(line_ends()->IsJSArray());
+ return;
+ }
+
Handle<String> src(String::cast(source()));
const int src_len = src->length();
Handle<String> new_line = Factory::NewStringFromAscii(CStrVector("\n"));
« no previous file with comments | « no previous file | test/cctest/test-compiler.cc » ('j') | test/cctest/test-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698