Index: src/log-inl.h |
diff --git a/src/log-inl.h b/src/log-inl.h |
index 765398fdd7c6a5e69e57fb2ec36457a013b91f7c..b9865976bf860840920865070a5325aa1d54d926 100644 |
--- a/src/log-inl.h |
+++ b/src/log-inl.h |
@@ -13,25 +13,24 @@ |
namespace v8 { |
namespace internal { |
-Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag, |
- Script* script) { |
- if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) && |
- script->type() == Script::TYPE_NATIVE) { |
- switch (tag) { |
- case FUNCTION_TAG: return NATIVE_FUNCTION_TAG; |
- case LAZY_COMPILE_TAG: return NATIVE_LAZY_COMPILE_TAG; |
- case SCRIPT_TAG: return NATIVE_SCRIPT_TAG; |
- default: return tag; |
- } |
- } else { |
- return tag; |
+CodeEventListener::LogEventsAndTags Logger::ToNativeByScript( |
+ CodeEventListener::LogEventsAndTags tag, Script* script) { |
+ if (script->type() != Script::TYPE_NATIVE) return tag; |
+ switch (tag) { |
+ case CodeEventListener::FUNCTION_TAG: |
+ return CodeEventListener::NATIVE_FUNCTION_TAG; |
+ case CodeEventListener::LAZY_COMPILE_TAG: |
+ return CodeEventListener::NATIVE_LAZY_COMPILE_TAG; |
+ case CodeEventListener::SCRIPT_TAG: |
+ return CodeEventListener::NATIVE_SCRIPT_TAG; |
+ default: |
+ return tag; |
} |
} |
- |
void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se, |
bool expose_to_api) { |
- if (isolate->event_logger() != NULL) { |
+ if (isolate->event_logger()) { |
if (isolate->event_logger() == DefaultEventLoggerSentinel) { |
LOG(isolate, TimerEvent(se, name)); |
} else if (expose_to_api) { |
@@ -39,6 +38,7 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se, |
} |
} |
} |
+ |
} // namespace internal |
} // namespace v8 |