Do not overwrite event logger when we explicitly have --log-timer-events.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 6 Jun 2014 09:50:33 +0000 (09:50 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 6 Jun 2014 09:50:33 +0000 (09:50 +0000)
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/318063002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/api.cc

index ab13647..bfd1011 100644 (file)
@@ -6649,6 +6649,8 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
 
 
 void Isolate::SetEventLogger(LogEventCallback that) {
+  // Do not overwrite the event logger if we want to log explicitly.
+  if (i::FLAG_log_timer_events) return;
   i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
   isolate->set_event_logger(that);
 }