Index: src/runtime/runtime-function.cc |
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc |
index 71c4812f4c8a16efc678042145afb3119a30e30c..966d50c9490eb9e6578bf7766bc0c8b29a8ce390 100644 |
--- a/src/runtime/runtime-function.cc |
+++ b/src/runtime/runtime-function.cc |
@@ -236,10 +236,12 @@ RUNTIME_FUNCTION(Runtime_SetCode) { |
// Make sure we get a fresh copy of the literal vector to avoid cross |
// context contamination. |
Handle<Context> context(source->context()); |
- int number_of_literals = source->NumberOfLiterals(); |
- Handle<FixedArray> literals = |
- isolate->factory()->NewFixedArray(number_of_literals, TENURED); |
target->set_context(*context); |
+ |
+ int number_of_literals = source->NumberOfLiterals(); |
+ Handle<LiteralsArray> literals = |
+ LiteralsArray::New(isolate, handle(target_shared->feedback_vector()), |
+ number_of_literals, TENURED); |
target->set_literals(*literals); |
if (isolate->logger()->is_logging_code_events() || |