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

Unified Diff: src/log-inl.h

Issue 651413002: Make event logger slightly more light-weight. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/log.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-inl.h
diff --git a/src/log-inl.h b/src/log-inl.h
index 22ea800585c326866cc8dc1efab35b7c19966d2a..a96631d059d1a5dd0dffb7d3ebd9ec9d2cd64584 100644
--- a/src/log-inl.h
+++ b/src/log-inl.h
@@ -29,10 +29,12 @@ Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
bool expose_to_api) {
- if (isolate->event_logger() == NULL) {
- if (FLAG_log_internal_timer_events) LOG(isolate, TimerEvent(se, name));
- } else if (expose_to_api) {
- isolate->event_logger()(name, se);
+ if (isolate->event_logger() != NULL) {
+ if (isolate->event_logger() == DefaultEventLoggerSentinel) {
+ LOG(isolate, TimerEvent(se, name));
+ } else if (expose_to_api) {
+ isolate->event_logger()(name, se);
+ }
}
}
} } // namespace v8::internal
« no previous file with comments | « src/log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698