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

Unified Diff: src/debug-agent.cc

Issue 7860011: Rename SmartPointer to SmartArrayPointer. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: rebase it again to get more fixes Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug-agent.h ('k') | src/disassembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-agent.cc
diff --git a/src/debug-agent.cc b/src/debug-agent.cc
index 520bc62926254b54e0e75df50678144bbfb47132..591d0b3e464bd79bb53e01fc947b1741534f8a45 100644
--- a/src/debug-agent.cc
+++ b/src/debug-agent.cc
@@ -169,7 +169,8 @@ void DebuggerAgentSession::Run() {
while (true) {
// Read data from the debugger front end.
- SmartPointer<char> message = DebuggerAgentUtil::ReceiveMessage(client_);
+ SmartArrayPointer<char> message =
+ DebuggerAgentUtil::ReceiveMessage(client_);
const char* msg = *message;
bool is_closing_session = (msg == NULL);
@@ -232,7 +233,7 @@ const int DebuggerAgentUtil::kContentLengthSize =
StrLength(kContentLength);
-SmartPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
+SmartArrayPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
int received;
// Read header.
@@ -250,7 +251,7 @@ SmartPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
received = conn->Receive(&c, 1);
if (received <= 0) {
PrintF("Error %d\n", Socket::LastError());
- return SmartPointer<char>();
+ return SmartArrayPointer<char>();
}
// Add character to header buffer.
@@ -287,12 +288,12 @@ SmartPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
if (strcmp(key, kContentLength) == 0) {
// Get the content length value if present and within a sensible range.
if (value == NULL || strlen(value) > 7) {
- return SmartPointer<char>();
+ return SmartArrayPointer<char>();
}
for (int i = 0; value[i] != '\0'; i++) {
// Bail out if illegal data.
if (value[i] < '0' || value[i] > '9') {
- return SmartPointer<char>();
+ return SmartArrayPointer<char>();
}
content_length = 10 * content_length + (value[i] - '0');
}
@@ -304,7 +305,7 @@ SmartPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
// Return now if no body.
if (content_length == 0) {
- return SmartPointer<char>();
+ return SmartArrayPointer<char>();
}
// Read body.
@@ -312,11 +313,11 @@ SmartPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) {
received = ReceiveAll(conn, buffer, content_length);
if (received < content_length) {
PrintF("Error %d\n", Socket::LastError());
- return SmartPointer<char>();
+ return SmartArrayPointer<char>();
}
buffer[content_length] = '\0';
- return SmartPointer<char>(buffer);
+ return SmartArrayPointer<char>(buffer);
}
« no previous file with comments | « src/debug-agent.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698