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

Unified Diff: src/top.cc

Issue 4070003: [Isolates] Convert more static data either to read-only or to per-isolate. (Closed)
Patch Set: Created 10 years, 2 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
« src/frames.h ('K') | « src/token.cc ('k') | src/unicode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.cc
diff --git a/src/top.cc b/src/top.cc
index 1e6ccb09135d6236e4e78d54c38d7d3bb025eb28..8cd1de65cef8e3909cb4fe807f29d84a5e79a750 100644
--- a/src/top.cc
+++ b/src/top.cc
@@ -191,7 +191,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace(
if (options & StackTrace::kLineNumber) {
int script_line_offset = script->line_offset()->value();
- int position = frame->code()->SourcePosition(frame->pc());
+ int position = frame->LookupCode(this)->SourcePosition(frame->pc());
int line_number = GetScriptLineNumber(script, position);
// line_number is already shifted by the script_line_offset.
int relative_line_number = line_number - script_line_offset;
@@ -549,7 +549,7 @@ void Isolate::PrintCurrentStackTrace(FILE* out) {
HandleScope scope;
// Find code position if recorded in relocation info.
JavaScriptFrame* frame = it.frame();
- int pos = frame->code()->SourcePosition(frame->pc());
+ int pos = frame->LookupCode(this)->SourcePosition(frame->pc());
Handle<Object> pos_obj(Smi::FromInt(pos));
// Fetch function and receiver.
Handle<JSFunction> fun(JSFunction::cast(frame->function()));
@@ -580,7 +580,7 @@ void Isolate::ComputeLocation(MessageLocation* target) {
Object* script = fun->shared()->script();
if (script->IsScript() &&
!(Script::cast(script)->source()->IsUndefined())) {
- int pos = frame->code()->SourcePosition(frame->pc());
+ int pos = frame->LookupCode(this)->SourcePosition(frame->pc());
// Compute the location from the function and the reloc info.
Handle<Script> casted_script(Script::cast(script));
*target = MessageLocation(casted_script, pos, pos + 1);
« src/frames.h ('K') | « src/token.cc ('k') | src/unicode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698