Chromium Code Reviews| Index: src/liveedit.cc |
| diff --git a/src/liveedit.cc b/src/liveedit.cc |
| index 8da3d52f555b78e23451bfbfeffacb9454e83f8f..458bcfb653e4f4f7821cfcdc8f7df86b262113f1 100644 |
| --- a/src/liveedit.cc |
| +++ b/src/liveedit.cc |
| @@ -995,9 +995,6 @@ class LiteralFixer { |
| Handle<SharedFunctionInfo> shared_info, |
| Isolate* isolate) { |
| int new_literal_count = compile_info_wrapper->GetLiteralCount(); |
| - if (new_literal_count > 0) { |
| - new_literal_count += JSFunction::kLiteralsPrefixSize; |
| - } |
| int old_literal_count = shared_info->num_literals(); |
| if (old_literal_count == new_literal_count) { |
| @@ -1016,18 +1013,6 @@ class LiteralFixer { |
| Handle<FixedArray> old_literals(fun->literals()); |
|
Michael Starzinger
2015/02/25 21:32:33
nit: The old_literals handle seems to be unused.
Toon Verwaest
2015/02/25 21:57:47
Done.
|
| Handle<FixedArray> new_literals = |
| isolate->factory()->NewFixedArray(new_literal_count); |
| - if (new_literal_count > 0) { |
| - Handle<Context> native_context; |
| - if (old_literals->length() > |
| - JSFunction::kLiteralNativeContextIndex) { |
| - native_context = Handle<Context>( |
| - JSFunction::NativeContextFromLiterals(fun->literals())); |
| - } else { |
| - native_context = Handle<Context>(fun->context()->native_context()); |
| - } |
| - new_literals->set(JSFunction::kLiteralNativeContextIndex, |
| - *native_context); |
| - } |
| fun->set_literals(*new_literals); |
| } |
| @@ -1075,7 +1060,7 @@ class LiteralFixer { |
| void visit(JSFunction* fun) { |
| FixedArray* literals = fun->literals(); |
| int len = literals->length(); |
| - for (int j = JSFunction::kLiteralsPrefixSize; j < len; j++) { |
| + for (int j = 0; j < len; j++) { |
| literals->set_undefined(j); |
| } |
| } |