summaryrefslogtreecommitdiff
path: root/deps/v8/src/liveedit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/liveedit.cc')
-rw-r--r--deps/v8/src/liveedit.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/deps/v8/src/liveedit.cc b/deps/v8/src/liveedit.cc
index e880cab7b7..c03d8d3e93 100644
--- a/deps/v8/src/liveedit.cc
+++ b/deps/v8/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) {
@@ -1013,21 +1010,8 @@ class LiteralFixer {
CollectJSFunctions(shared_info, isolate);
for (int i = 0; i < function_instances->length(); i++) {
Handle<JSFunction> fun(JSFunction::cast(function_instances->get(i)));
- Handle<FixedArray> old_literals(fun->literals());
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 +1059,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);
}
}