| Index: src/log.cc
|
| diff --git a/src/log.cc b/src/log.cc
|
| index c634d28e9dd572304a4b7e5901419067a7faa643..97f599e98e3096c38774cabcc2fab4695daf6f55 100644
|
| --- a/src/log.cc
|
| +++ b/src/log.cc
|
| @@ -953,10 +953,10 @@ TIMER_EVENTS_LIST(V)
|
| #undef V
|
|
|
|
|
| -void Logger::LogRegExpSource(Handle<JSRegExp> regexp) {
|
| +void Logger::LogRegExpSource(Handle<JSRegExp> regexp,
|
| + Log::MessageBuilder& msg) {
|
| // Prints "/" + re.source + "/" +
|
| // (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"")
|
| - Log::MessageBuilder msg(log_);
|
|
|
| Handle<Object> source = Object::GetProperty(
|
| isolate_, regexp, "source").ToHandleChecked();
|
| @@ -994,8 +994,6 @@ void Logger::LogRegExpSource(Handle<JSRegExp> regexp) {
|
| if (multiline->IsTrue()) {
|
| msg.Append('m');
|
| }
|
| -
|
| - msg.WriteToLogFile();
|
| }
|
|
|
|
|
| @@ -1003,7 +1001,7 @@ void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) {
|
| if (!log_->IsEnabled() || !FLAG_log_regexp) return;
|
| Log::MessageBuilder msg(log_);
|
| msg.Append("regexp-compile,");
|
| - LogRegExpSource(regexp);
|
| + LogRegExpSource(regexp, msg);
|
| msg.Append(in_cache ? ",hit" : ",miss");
|
| msg.WriteToLogFile();
|
| }
|
|
|