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

Side by Side Diff: src/debug-agent.h

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 unified diff | Download patch
« no previous file with comments | « src/d8-readline.cc ('k') | src/debug-agent.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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Isolate* isolate() { return isolate_; } 65 Isolate* isolate() { return isolate_; }
66 66
67 private: 67 private:
68 void Run(); 68 void Run();
69 void CreateSession(Socket* socket); 69 void CreateSession(Socket* socket);
70 void DebuggerMessage(const v8::Debug::Message& message); 70 void DebuggerMessage(const v8::Debug::Message& message);
71 void CloseSession(); 71 void CloseSession();
72 void OnSessionClosed(DebuggerAgentSession* session); 72 void OnSessionClosed(DebuggerAgentSession* session);
73 73
74 Isolate* isolate_; 74 Isolate* isolate_;
75 SmartPointer<const char> name_; // Name of the embedding application. 75 SmartArrayPointer<const char> name_; // Name of the embedding application.
76 int port_; // Port to use for the agent. 76 int port_; // Port to use for the agent.
77 Socket* server_; // Server socket for listen/accept. 77 Socket* server_; // Server socket for listen/accept.
78 bool terminate_; // Termination flag. 78 bool terminate_; // Termination flag.
79 Mutex* session_access_; // Mutex guarging access to session_. 79 Mutex* session_access_; // Mutex guarging access to session_.
80 DebuggerAgentSession* session_; // Current active session if any. 80 DebuggerAgentSession* session_; // Current active session if any.
81 Semaphore* terminate_now_; // Semaphore to signal termination. 81 Semaphore* terminate_now_; // Semaphore to signal termination.
82 Semaphore* listening_; 82 Semaphore* listening_;
83 83
84 friend class DebuggerAgentSession; 84 friend class DebuggerAgentSession;
85 friend void DebuggerAgentMessageHandler(const v8::Debug::Message& message); 85 friend void DebuggerAgentMessageHandler(const v8::Debug::Message& message);
(...skipping 24 matching lines...) Expand all
110 DISALLOW_COPY_AND_ASSIGN(DebuggerAgentSession); 110 DISALLOW_COPY_AND_ASSIGN(DebuggerAgentSession);
111 }; 111 };
112 112
113 113
114 // Utility methods factored out to be used by the D8 shell as well. 114 // Utility methods factored out to be used by the D8 shell as well.
115 class DebuggerAgentUtil { 115 class DebuggerAgentUtil {
116 public: 116 public:
117 static const char* const kContentLength; 117 static const char* const kContentLength;
118 static const int kContentLengthSize; 118 static const int kContentLengthSize;
119 119
120 static SmartPointer<char> ReceiveMessage(const Socket* conn); 120 static SmartArrayPointer<char> ReceiveMessage(const Socket* conn);
121 static bool SendConnectMessage(const Socket* conn, 121 static bool SendConnectMessage(const Socket* conn,
122 const char* embedding_host); 122 const char* embedding_host);
123 static bool SendMessage(const Socket* conn, const Vector<uint16_t> message); 123 static bool SendMessage(const Socket* conn, const Vector<uint16_t> message);
124 static bool SendMessage(const Socket* conn, 124 static bool SendMessage(const Socket* conn,
125 const v8::Handle<v8::String> message); 125 const v8::Handle<v8::String> message);
126 static int ReceiveAll(const Socket* conn, char* data, int len); 126 static int ReceiveAll(const Socket* conn, char* data, int len);
127 }; 127 };
128 128
129 } } // namespace v8::internal 129 } } // namespace v8::internal
130 130
131 #endif // ENABLE_DEBUGGER_SUPPORT 131 #endif // ENABLE_DEBUGGER_SUPPORT
132 132
133 #endif // V8_DEBUG_AGENT_H_ 133 #endif // V8_DEBUG_AGENT_H_
OLDNEW
« no previous file with comments | « src/d8-readline.cc ('k') | src/debug-agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698