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

Unified Diff: src/runtime/runtime-internal.cc

Issue 2628973005: [runtime] Change MessageLocation::function to SFI. (Closed)
Patch Set: Rebased. Created 3 years, 11 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/messages.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index b27df2117e18998c35ef3c9ee7293857ed5ab179..6ff0a09b614a09f3ded929de06d6bdf0edf9027c 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -333,13 +333,13 @@ bool ComputeLocation(Isolate* isolate, MessageLocation* target) {
List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
it.frame()->Summarize(&frames);
auto& summary = frames.last().AsJavaScript();
- Handle<JSFunction> function = summary.function();
- Handle<Object> script(function->shared()->script(), isolate);
+ Handle<SharedFunctionInfo> shared(summary.function()->shared());
+ Handle<Object> script(shared->script(), isolate);
int pos = summary.abstract_code()->SourcePosition(summary.code_offset());
if (script->IsScript() &&
!(Handle<Script>::cast(script)->source()->IsUndefined(isolate))) {
Handle<Script> casted_script = Handle<Script>::cast(script);
- *target = MessageLocation(casted_script, pos, pos + 1, function);
+ *target = MessageLocation(casted_script, pos, pos + 1, shared);
return true;
}
}
@@ -351,11 +351,9 @@ Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
MessageLocation location;
if (ComputeLocation(isolate, &location)) {
Zone zone(isolate->allocator(), ZONE_NAME);
- std::unique_ptr<ParseInfo> info(
- new ParseInfo(&zone, handle(location.function()->shared())));
+ std::unique_ptr<ParseInfo> info(new ParseInfo(&zone, location.shared()));
if (parsing::ParseAny(info.get())) {
- CallPrinter printer(isolate,
- location.function()->shared()->IsUserJavaScript());
+ CallPrinter printer(isolate, location.shared()->IsUserJavaScript());
Handle<String> str = printer.Print(info->literal(), location.start_pos());
if (str->length() > 0) return str;
} else {
« no previous file with comments | « src/messages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698