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

Side by Side Diff: src/log-utils.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/log.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log-utils.h" 5 #include "src/log-utils.h"
6 6
7 #include "src/assert-scope.h" 7 #include "src/assert-scope.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 #include "src/string-stream.h" 10 #include "src/string-stream.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 } 165 }
166 166
167 void Log::MessageBuilder::AppendAddress(Address addr) { 167 void Log::MessageBuilder::AppendAddress(Address addr) {
168 Append("%p", static_cast<void*>(addr)); 168 Append("%p", static_cast<void*>(addr));
169 } 169 }
170 170
171 void Log::MessageBuilder::AppendSymbolName(Symbol* symbol) { 171 void Log::MessageBuilder::AppendSymbolName(Symbol* symbol) {
172 DCHECK(symbol); 172 DCHECK(symbol);
173 Append("symbol("); 173 Append("symbol(");
174 if (!symbol->name()->IsUndefined()) { 174 if (!symbol->name()->IsUndefined(symbol->GetIsolate())) {
175 Append("\""); 175 Append("\"");
176 AppendDetailed(String::cast(symbol->name()), false); 176 AppendDetailed(String::cast(symbol->name()), false);
177 Append("\" "); 177 Append("\" ");
178 } 178 }
179 Append("hash %x)", symbol->Hash()); 179 Append("hash %x)", symbol->Hash());
180 } 180 }
181 181
182 182
183 void Log::MessageBuilder::AppendDetailed(String* str, bool show_impl_info) { 183 void Log::MessageBuilder::AppendDetailed(String* str, bool show_impl_info) {
184 if (str == NULL) return; 184 if (str == NULL) return;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 const int written = log_->WriteToFile(log_->message_buffer_, pos_); 236 const int written = log_->WriteToFile(log_->message_buffer_, pos_);
237 if (written != pos_) { 237 if (written != pos_) {
238 log_->stop(); 238 log_->stop();
239 log_->logger_->LogFailure(); 239 log_->logger_->LogFailure();
240 } 240 }
241 } 241 }
242 242
243 243
244 } // namespace internal 244 } // namespace internal
245 } // namespace v8 245 } // namespace v8
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698