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

Unified Diff: src/isolate.cc

Issue 2562973002: [perf-prof] fix crash when logging. (Closed)
Patch Set: remove stray edit Created 4 years 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/isolate.h ('k') | src/messages.cc » ('j') | src/perf-jit.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index cb3c4a79dca7aa2feb41a3e392335d5d7de5995c..883abc0e6e96fb638faed97fcf48c88b39c63467 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -658,7 +658,7 @@ class CaptureStackTraceHelper {
}
if (!script_name_or_source_url_key_.is_null()) {
- Handle<Object> result = Script::GetNameOrSourceURL(script);
+ Handle<Object> result(script->GetNameOrSourceURL(), isolate_);
JSObject::AddProperty(stack_frame, script_name_or_source_url_key_, result,
NONE);
}
@@ -1077,7 +1077,7 @@ Object* Isolate::Throw(Object* exception, MessageLocation* location) {
printf("Exception thrown:\n");
if (location) {
Handle<Script> script = location->script();
- Handle<Object> name = Script::GetNameOrSourceURL(script);
+ Handle<Object> name(script->GetNameOrSourceURL(), this);
printf("at ");
if (name->IsString() && String::cast(*name)->length() > 0)
String::cast(*name)->PrintOn(stdout);
@@ -2808,6 +2808,12 @@ bool Isolate::use_crankshaft() const {
CpuFeatures::SupportsCrankshaft();
}
+bool Isolate::NeedsSourcePositionsForProfiling() const {
+ return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph ||
+ FLAG_turbo_profiling || is_profiling() || debug_->is_active() ||
+ logger_->is_logging();
+}
+
bool Isolate::IsArrayOrObjectPrototype(Object* object) {
Object* context = heap()->native_contexts_list();
while (!context->IsUndefined(this)) {
« no previous file with comments | « src/isolate.h ('k') | src/messages.cc » ('j') | src/perf-jit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698