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

Unified Diff: src/accessors.cc

Issue 1888013002: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index dcf0ce86f908d8519acc5014d7559321ad18f0bb..73b225dba42fee6db4002cc5dd05289959b6bc17 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -661,8 +661,11 @@
Script::cast(Handle<JSValue>::cast(object)->value()), isolate);
Handle<Object> result = isolate->factory()->undefined_value();
if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) {
- result =
- Handle<Object>(Smi::FromInt(script->eval_from_position()), isolate);
+ Handle<Code> code(SharedFunctionInfo::cast(
+ script->eval_from_shared())->code());
+ result = Handle<Object>(Smi::FromInt(code->SourcePosition(
+ script->eval_from_instructions_offset())),
+ isolate);
}
info.GetReturnValue().Set(Utils::ToLocal(result));
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698