diff options
Diffstat (limited to 'deps/v8/src/string-stream.cc')
-rw-r--r-- | deps/v8/src/string-stream.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/deps/v8/src/string-stream.cc b/deps/v8/src/string-stream.cc index 650b3cf93a..28cc44a220 100644 --- a/deps/v8/src/string-stream.cc +++ b/deps/v8/src/string-stream.cc @@ -190,15 +190,15 @@ void StringStream::PrintObject(Object* o) { HeapObject* ho = HeapObject::cast(o); DebugObjectCache* debug_object_cache = ho->GetIsolate()-> string_stream_debug_object_cache(); - for (int i = 0; i < debug_object_cache->length(); i++) { + for (size_t i = 0; i < debug_object_cache->size(); i++) { if ((*debug_object_cache)[i] == o) { - Add("#%d#", i); + Add("#%d#", static_cast<int>(i)); return; } } - if (debug_object_cache->length() < kMentionedObjectCacheMaxSize) { - Add("#%d#", debug_object_cache->length()); - debug_object_cache->Add(HeapObject::cast(o)); + if (debug_object_cache->size() < kMentionedObjectCacheMaxSize) { + Add("#%d#", static_cast<int>(debug_object_cache->size())); + debug_object_cache->push_back(HeapObject::cast(o)); } else { Add("@%p", o); } @@ -244,16 +244,16 @@ Handle<String> StringStream::ToString(Isolate* isolate) { void StringStream::ClearMentionedObjectCache(Isolate* isolate) { isolate->set_string_stream_current_security_token(NULL); if (isolate->string_stream_debug_object_cache() == NULL) { - isolate->set_string_stream_debug_object_cache(new DebugObjectCache(0)); + isolate->set_string_stream_debug_object_cache(new DebugObjectCache()); } - isolate->string_stream_debug_object_cache()->Clear(); + isolate->string_stream_debug_object_cache()->clear(); } #ifdef DEBUG bool StringStream::IsMentionedObjectCacheClear(Isolate* isolate) { return object_print_mode_ == kPrintObjectConcise || - isolate->string_stream_debug_object_cache()->length() == 0; + isolate->string_stream_debug_object_cache()->size() == 0; } #endif @@ -377,9 +377,9 @@ void StringStream::PrintMentionedObjectCache(Isolate* isolate) { DebugObjectCache* debug_object_cache = isolate->string_stream_debug_object_cache(); Add("==== Key ============================================\n\n"); - for (int i = 0; i < debug_object_cache->length(); i++) { + for (size_t i = 0; i < debug_object_cache->size(); i++) { HeapObject* printee = (*debug_object_cache)[i]; - Add(" #%d# %p: ", i, printee); + Add(" #%d# %p: ", static_cast<int>(i), printee); printee->ShortPrint(this); Add("\n"); if (printee->IsJSObject()) { |