summaryrefslogtreecommitdiff
path: root/deps/v8/test/unittests/test-helpers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/unittests/test-helpers.cc')
-rw-r--r--deps/v8/test/unittests/test-helpers.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/v8/test/unittests/test-helpers.cc b/deps/v8/test/unittests/test-helpers.cc
index a40b0359ef..ee601da900 100644
--- a/deps/v8/test/unittests/test-helpers.cc
+++ b/deps/v8/test/unittests/test-helpers.cc
@@ -38,12 +38,15 @@ Handle<SharedFunctionInfo> CreateSharedFunctionInfo(
isolate->factory()->NewSharedFunctionInfoForBuiltin(
isolate->factory()->NewStringFromAsciiChecked("f"),
Builtins::kCompileLazy);
- shared->set_raw_end_position(source->length());
+ int function_literal_id = 1;
+ // Ensure that the function can be compiled lazily.
+ shared->set_uncompiled_data(
+ *isolate->factory()->NewUncompiledDataWithoutPreParsedScope(
+ 0, source->length(), function_literal_id));
// Make sure we have an outer scope info, even though it's empty
shared->set_raw_outer_scope_info_or_feedback_metadata(
ScopeInfo::Empty(isolate));
- shared->set_function_literal_id(1);
- SharedFunctionInfo::SetScript(shared, script);
+ SharedFunctionInfo::SetScript(shared, script, function_literal_id);
return scope.CloseAndEscape(shared);
}