Index: src/accessors.cc |
=================================================================== |
--- src/accessors.cc (revision 3373) |
+++ src/accessors.cc (working copy) |
@@ -315,14 +315,11 @@ |
HandleScope scope; |
Handle<Script> script(Script::cast(JSValue::cast(object)->value())); |
InitScriptLineEnds(script); |
- if (script->line_ends_js_array()->IsUndefined()) { |
- Handle<FixedArray> line_ends_fixed_array( |
- FixedArray::cast(script->line_ends_fixed_array())); |
- Handle<FixedArray> copy = Factory::CopyFixedArray(line_ends_fixed_array); |
- Handle<JSArray> js_array = Factory::NewJSArrayWithElements(copy); |
- script->set_line_ends_js_array(*js_array); |
- } |
- return script->line_ends_js_array(); |
+ ASSERT(script->line_ends()->IsFixedArray()); |
+ Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends())); |
+ Handle<FixedArray> copy = Factory::CopyFixedArray(line_ends); |
+ Handle<JSArray> js_array = Factory::NewJSArrayWithElements(copy); |
+ return *js_array; |
} |