| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/string-stream.h" | 5 #include "src/string-stream.h" |
| 6 | 6 |
| 7 #include "src/handles-inl.h" | 7 #include "src/handles-inl.h" |
| 8 #include "src/prototype.h" | 8 #include "src/prototype.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 275 |
| 276 void StringStream::ClearMentionedObjectCache(Isolate* isolate) { | 276 void StringStream::ClearMentionedObjectCache(Isolate* isolate) { |
| 277 isolate->set_string_stream_current_security_token(NULL); | 277 isolate->set_string_stream_current_security_token(NULL); |
| 278 if (isolate->string_stream_debug_object_cache() == NULL) { | 278 if (isolate->string_stream_debug_object_cache() == NULL) { |
| 279 isolate->set_string_stream_debug_object_cache(new DebugObjectCache(0)); | 279 isolate->set_string_stream_debug_object_cache(new DebugObjectCache(0)); |
| 280 } | 280 } |
| 281 isolate->string_stream_debug_object_cache()->Clear(); | 281 isolate->string_stream_debug_object_cache()->Clear(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 | 284 |
| 285 #ifdef DEBUG | 285 #if DCHECK_IS_ON |
| 286 bool StringStream::IsMentionedObjectCacheClear(Isolate* isolate) { | 286 bool StringStream::IsMentionedObjectCacheClear(Isolate* isolate) { |
| 287 return isolate->string_stream_debug_object_cache()->length() == 0; | 287 return isolate->string_stream_debug_object_cache()->length() == 0; |
| 288 } | 288 } |
| 289 #endif | 289 #endif |
| 290 | 290 |
| 291 | 291 |
| 292 bool StringStream::Put(String* str) { | 292 bool StringStream::Put(String* str) { |
| 293 return Put(str, 0, str->length()); | 293 return Put(str, 0, str->length()); |
| 294 } | 294 } |
| 295 | 295 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 } | 556 } |
| 557 MemCopy(new_space, space_, *bytes); | 557 MemCopy(new_space, space_, *bytes); |
| 558 *bytes = new_bytes; | 558 *bytes = new_bytes; |
| 559 DeleteArray(space_); | 559 DeleteArray(space_); |
| 560 space_ = new_space; | 560 space_ = new_space; |
| 561 return new_space; | 561 return new_space; |
| 562 } | 562 } |
| 563 | 563 |
| 564 | 564 |
| 565 } } // namespace v8::internal | 565 } } // namespace v8::internal |
| OLD | NEW |