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

Unified Diff: src/objects.cc

Issue 28069: A refinement of cl 28068. (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 | no next file » | no next file with comments »
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 fc3106e34783fc978c1cc55b735711291dbf1f9d..dbecdc907c49b40868f1e2a4b1faebc0928c3e86 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6953,8 +6953,9 @@ Object* Dictionary::TransformPropertiesToFastFor(JSObject* obj,
void Script::InitLineEnds() {
if (!line_ends()->IsUndefined()) return;
- if (source()->IsUndefined()) {
- set_line_ends(*(Factory::NewArrayLiteral(0)));
+ if (!source()->IsString()) {
+ ASSERT(source()->IsUndefined());
+ set_line_ends(*(Factory::NewJSArray(0)));
ASSERT(line_ends()->IsJSArray());
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698