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

Side by Side Diff: src/debug.cc

Issue 93014: Do not include trailing '\0' in debugger output string (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2206
2207 Message Message::NewHostDispatch(v8::Debug::ClientData* dispatch) { 2207 Message Message::NewHostDispatch(v8::Debug::ClientData* dispatch) {
2208 return Message(Vector<uint16_t>::empty(), dispatch, true); 2208 return Message(Vector<uint16_t>::empty(), dispatch, true);
2209 } 2209 }
2210 2210
2211 2211
2212 Message Message::NewOutput(v8::Handle<v8::String> output, 2212 Message Message::NewOutput(v8::Handle<v8::String> output,
2213 v8::Debug::ClientData* data) { 2213 v8::Debug::ClientData* data) {
2214 Vector<uint16_t> text; 2214 Vector<uint16_t> text;
2215 if (!output.IsEmpty()) { 2215 if (!output.IsEmpty()) {
2216 text = Vector<uint16_t>::New(output->Length() + 1); 2216 // Do not include trailing '\0'.
2217 output->Write(text.start()); 2217 text = Vector<uint16_t>::New(output->Length());
2218 output->Write(text.start(), 0, output->Length());
2218 } 2219 }
2219 return Message(text, data, false); 2220 return Message(text, data, false);
2220 } 2221 }
2221 2222
2222 2223
2223 Message Message::NewEmptyMessage() { 2224 Message Message::NewEmptyMessage() {
2224 return Message(); 2225 return Message();
2225 } 2226 }
2226 2227
2227 2228
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 2303
2303 2304
2304 void LockingMessageQueue::Clear() { 2305 void LockingMessageQueue::Clear() {
2305 ScopedLock sl(lock_); 2306 ScopedLock sl(lock_);
2306 queue_.Clear(); 2307 queue_.Clear();
2307 } 2308 }
2308 2309
2309 #endif // ENABLE_DEBUGGER_SUPPORT 2310 #endif // ENABLE_DEBUGGER_SUPPORT
2310 2311
2311 } } // namespace v8::internal 2312 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698