Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/api.cc

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 48857797fb9e7cd73e2948a4894c36fb4986830f..a008aa04e3da2f6fa3bde138324819d3eac680d8 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2033,6 +2033,8 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
}
i::Handle<i::Object> name_obj;
+ int eval_scope_position = 0;
+ int eval_position = i::RelocInfo::kNoPosition;
int line_offset = 0;
int column_offset = 0;
if (!source->resource_name.IsEmpty()) {
@@ -2045,11 +2047,13 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
column_offset = static_cast<int>(source->resource_column_offset->Value());
}
i::Handle<i::JSFunction> fun;
- has_pending_exception = !i::Compiler::GetFunctionFromEval(
- source_string, outer_info, context, i::SLOPPY,
- i::ONLY_SINGLE_FUNCTION_LITERAL, line_offset,
- column_offset - scope_position, name_obj,
- source->resource_options).ToHandle(&fun);
+ has_pending_exception =
+ !i::Compiler::GetFunctionFromEval(
+ source_string, outer_info, context, i::SLOPPY,
+ i::ONLY_SINGLE_FUNCTION_LITERAL, eval_scope_position, eval_position,
+ line_offset, column_offset - scope_position, name_obj,
+ source->resource_options)
+ .ToHandle(&fun);
if (has_pending_exception) {
isolate->ReportPendingMessages();
}
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698