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

Side by Side Diff: src/api.cc

Issue 799008: Make the assumption on the minimum buffer size for GetLogLines explicit. (Closed)
Patch Set: Added assert, removed failing checks from test. Created 10 years, 9 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 | « include/v8.h ('k') | src/log-utils.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 3562 matching lines...) Expand 10 before | Expand all | Expand 10 after
3573 #ifdef ENABLE_LOGGING_AND_PROFILING 3573 #ifdef ENABLE_LOGGING_AND_PROFILING
3574 return i::Logger::GetActiveProfilerModules(); 3574 return i::Logger::GetActiveProfilerModules();
3575 #else 3575 #else
3576 return PROFILER_MODULE_NONE; 3576 return PROFILER_MODULE_NONE;
3577 #endif 3577 #endif
3578 } 3578 }
3579 3579
3580 3580
3581 int V8::GetLogLines(int from_pos, char* dest_buf, int max_size) { 3581 int V8::GetLogLines(int from_pos, char* dest_buf, int max_size) {
3582 #ifdef ENABLE_LOGGING_AND_PROFILING 3582 #ifdef ENABLE_LOGGING_AND_PROFILING
3583 ASSERT(max_size >= kMinimumSizeForLogLinesBuffer);
3583 return i::Logger::GetLogLines(from_pos, dest_buf, max_size); 3584 return i::Logger::GetLogLines(from_pos, dest_buf, max_size);
3584 #endif 3585 #endif
3585 return 0; 3586 return 0;
3586 } 3587 }
3587 3588
3588 3589
3589 int V8::GetCurrentThreadId() { 3590 int V8::GetCurrentThreadId() {
3590 API_ENTRY_CHECK("V8::GetCurrentThreadId()"); 3591 API_ENTRY_CHECK("V8::GetCurrentThreadId()");
3591 EnsureInitialized("V8::GetCurrentThreadId()"); 3592 EnsureInitialized("V8::GetCurrentThreadId()");
3592 return i::Top::thread_id(); 3593 return i::Top::thread_id();
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
3999 4000
4000 4001
4001 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 4002 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
4002 HandleScopeImplementer* thread_local = 4003 HandleScopeImplementer* thread_local =
4003 reinterpret_cast<HandleScopeImplementer*>(storage); 4004 reinterpret_cast<HandleScopeImplementer*>(storage);
4004 thread_local->IterateThis(v); 4005 thread_local->IterateThis(v);
4005 return storage + ArchiveSpacePerThread(); 4006 return storage + ArchiveSpacePerThread();
4006 } 4007 }
4007 4008
4008 } } // namespace v8::internal 4009 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/log-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698