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

Side by Side Diff: src/string-stream.cc

Issue 10443114: Progress towards making Zones independent of Isolates and Threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits and rebase on current bleeding_edge Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/splay-tree-inl.h ('k') | src/v8.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 Handle<String> StringStream::ToString() { 284 Handle<String> StringStream::ToString() {
285 return FACTORY->NewStringFromUtf8(Vector<const char>(buffer_, length_)); 285 return FACTORY->NewStringFromUtf8(Vector<const char>(buffer_, length_));
286 } 286 }
287 287
288 288
289 void StringStream::ClearMentionedObjectCache() { 289 void StringStream::ClearMentionedObjectCache() {
290 Isolate* isolate = Isolate::Current(); 290 Isolate* isolate = Isolate::Current();
291 isolate->set_string_stream_current_security_token(NULL); 291 isolate->set_string_stream_current_security_token(NULL);
292 if (isolate->string_stream_debug_object_cache() == NULL) { 292 if (isolate->string_stream_debug_object_cache() == NULL) {
293 isolate->set_string_stream_debug_object_cache( 293 isolate->set_string_stream_debug_object_cache(
294 new List<HeapObject*, PreallocatedStorage>(0)); 294 new List<HeapObject*, PreallocatedStorageAllocationPolicy>(0));
295 } 295 }
296 isolate->string_stream_debug_object_cache()->Clear(); 296 isolate->string_stream_debug_object_cache()->Clear();
297 } 297 }
298 298
299 299
300 #ifdef DEBUG 300 #ifdef DEBUG
301 bool StringStream::IsMentionedObjectCacheClear() { 301 bool StringStream::IsMentionedObjectCacheClear() {
302 return ( 302 return (
303 Isolate::Current()->string_stream_debug_object_cache()->length() == 0); 303 Isolate::Current()->string_stream_debug_object_cache()->length() == 0);
304 } 304 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 // Only grow once to the maximum allowable size. 581 // Only grow once to the maximum allowable size.
582 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 582 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
583 ASSERT(size_ >= *bytes); 583 ASSERT(size_ >= *bytes);
584 *bytes = size_; 584 *bytes = size_;
585 return space_; 585 return space_;
586 } 586 }
587 587
588 588
589 } } // namespace v8::internal 589 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/splay-tree-inl.h ('k') | src/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698