OLD | NEW |
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 // Forward the message handling to the session. | 167 // Forward the message handling to the session. |
168 if (session_ != NULL) { | 168 if (session_ != NULL) { |
169 v8::String::Value val(message.GetJSON()); | 169 v8::String::Value val(message.GetJSON()); |
170 session_->DebuggerMessage(Vector<uint16_t>(const_cast<uint16_t*>(*val), | 170 session_->DebuggerMessage(Vector<uint16_t>(const_cast<uint16_t*>(*val), |
171 val.length())); | 171 val.length())); |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 | 175 |
| 176 DebuggerAgentSession::~DebuggerAgentSession() { |
| 177 delete client_; |
| 178 } |
| 179 |
| 180 |
176 void DebuggerAgent::OnSessionClosed(DebuggerAgentSession* session) { | 181 void DebuggerAgent::OnSessionClosed(DebuggerAgentSession* session) { |
177 // Don't do anything during termination. | 182 // Don't do anything during termination. |
178 if (terminate_) { | 183 if (terminate_) { |
179 return; | 184 return; |
180 } | 185 } |
181 | 186 |
182 // Terminate the session. | 187 // Terminate the session. |
183 LockGuard<RecursiveMutex> session_access_guard(&session_access_); | 188 LockGuard<RecursiveMutex> session_access_guard(&session_access_); |
184 ASSERT(session == session_); | 189 ASSERT(session == session_); |
185 if (session == session_) { | 190 if (session == session_) { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 return total_received; | 499 return total_received; |
495 } | 500 } |
496 total_received += received; | 501 total_received += received; |
497 } | 502 } |
498 return total_received; | 503 return total_received; |
499 } | 504 } |
500 | 505 |
501 } } // namespace v8::internal | 506 } } // namespace v8::internal |
502 | 507 |
503 #endif // ENABLE_DEBUGGER_SUPPORT | 508 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |