| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index f3f8dbd086d3288d5e51214f8cdc8a3880367203..b881b18669d19aa88bf5e9b686f31f711873440c 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -1206,7 +1206,9 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
|
| MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
|
| Handle<String> source, Handle<SharedFunctionInfo> outer_info,
|
| Handle<Context> context, LanguageMode language_mode,
|
| - ParseRestriction restriction, int scope_position) {
|
| + ParseRestriction restriction, int line_offset, int column_offset,
|
| + Handle<Object> script_name, bool is_embedder_debug_script,
|
| + bool is_shared_cross_origin) {
|
| Isolate* isolate = source->GetIsolate();
|
| int source_length = source->length();
|
| isolate->counters()->total_eval_size()->Increment(source_length);
|
| @@ -1215,11 +1217,18 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
|
| CompilationCache* compilation_cache = isolate->compilation_cache();
|
| MaybeHandle<SharedFunctionInfo> maybe_shared_info =
|
| compilation_cache->LookupEval(source, outer_info, context, language_mode,
|
| - scope_position);
|
| + line_offset);
|
| Handle<SharedFunctionInfo> shared_info;
|
|
|
| if (!maybe_shared_info.ToHandle(&shared_info)) {
|
| Handle<Script> script = isolate->factory()->NewScript(source);
|
| + if (!script_name.is_null()) {
|
| + script->set_name(*script_name);
|
| + script->set_line_offset(Smi::FromInt(line_offset));
|
| + script->set_column_offset(Smi::FromInt(column_offset));
|
| + }
|
| + script->set_is_shared_cross_origin(is_shared_cross_origin);
|
| + script->set_is_embedder_debug_script(is_embedder_debug_script);
|
| CompilationInfoWithZone info(script);
|
| info.MarkAsEval();
|
| if (context->IsNativeContext()) info.MarkAsGlobal();
|
| @@ -1245,7 +1254,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
|
| is_strict(shared_info->language_mode()));
|
| if (!shared_info->dont_cache()) {
|
| compilation_cache->PutEval(source, outer_info, context, shared_info,
|
| - scope_position);
|
| + line_offset);
|
| }
|
| }
|
| } else if (shared_info->ic_age() != isolate->heap()->global_ic_age()) {
|
|
|