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

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

Issue 23480067: remove ISOLATE (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/spaces.cc ('k') | src/x64/regexp-macro-assembler-x64.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 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 SmartArrayPointer<const char> StringStream::ToCString() const { 264 SmartArrayPointer<const char> StringStream::ToCString() const {
265 char* str = NewArray<char>(length_ + 1); 265 char* str = NewArray<char>(length_ + 1);
266 OS::MemCopy(str, buffer_, length_); 266 OS::MemCopy(str, buffer_, length_);
267 str[length_] = '\0'; 267 str[length_] = '\0';
268 return SmartArrayPointer<const char>(str); 268 return SmartArrayPointer<const char>(str);
269 } 269 }
270 270
271 271
272 void StringStream::Log() { 272 void StringStream::Log() {
273 LOG(ISOLATE, StringEvent("StackDump", buffer_)); 273 LOG(Isolate::Current(), StringEvent("StackDump", buffer_));
274 } 274 }
275 275
276 276
277 void StringStream::OutputToFile(FILE* out) { 277 void StringStream::OutputToFile(FILE* out) {
278 // Dump the output to stdout, but make sure to break it up into 278 // Dump the output to stdout, but make sure to break it up into
279 // manageable chunks to avoid losing parts of the output in the OS 279 // manageable chunks to avoid losing parts of the output in the OS
280 // printing code. This is a problem on Windows in particular; see 280 // printing code. This is a problem on Windows in particular; see
281 // the VPrint() function implementations in platform-win32.cc. 281 // the VPrint() function implementations in platform-win32.cc.
282 unsigned position = 0; 282 unsigned position = 0;
283 for (unsigned next; (next = position + 2048) < length_; position = next) { 283 for (unsigned next; (next = position + 2048) < length_; position = next) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 // Only grow once to the maximum allowable size. 584 // Only grow once to the maximum allowable size.
585 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 585 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
586 ASSERT(size_ >= *bytes); 586 ASSERT(size_ >= *bytes);
587 *bytes = size_; 587 *bytes = size_;
588 return space_; 588 return space_;
589 } 589 }
590 590
591 591
592 } } // namespace v8::internal 592 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698