| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (request->IsUndefined()) { | 298 if (request->IsUndefined()) { |
| 299 return; | 299 return; |
| 300 } | 300 } |
| 301 | 301 |
| 302 // Send the JSON debugger request. | 302 // Send the JSON debugger request. |
| 303 i::DebuggerAgentUtil::SendMessage(conn_, Handle<String>::Cast(request)); | 303 i::DebuggerAgentUtil::SendMessage(conn_, Handle<String>::Cast(request)); |
| 304 } | 304 } |
| 305 | 305 |
| 306 | 306 |
| 307 void ReceiverThread::Run() { | 307 void ReceiverThread::Run() { |
| 308 // Receive the connect message (with empty body). |
| 309 i::SmartPointer<char> message = |
| 310 i::DebuggerAgentUtil::ReceiveMessage(remote_debugger_->conn()); |
| 311 ASSERT(*message == NULL); |
| 312 |
| 308 while (true) { | 313 while (true) { |
| 309 // Receive a message. | 314 // Receive a message. |
| 310 i::SmartPointer<char> message = | 315 i::SmartPointer<char> message = |
| 311 i::DebuggerAgentUtil::ReceiveMessage(remote_debugger_->conn()); | 316 i::DebuggerAgentUtil::ReceiveMessage(remote_debugger_->conn()); |
| 312 if (*message == NULL) { | 317 if (*message == NULL) { |
| 313 remote_debugger_->ConnectionClosed(); | 318 remote_debugger_->ConnectionClosed(); |
| 314 return; | 319 return; |
| 315 } | 320 } |
| 316 | 321 |
| 317 // Pass the message to the main thread. | 322 // Pass the message to the main thread. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 331 } | 336 } |
| 332 | 337 |
| 333 // Pass the keyboard command to the main thread. | 338 // Pass the keyboard command to the main thread. |
| 334 remote_debugger_->KeyboardCommand( | 339 remote_debugger_->KeyboardCommand( |
| 335 i::SmartPointer<char>(i::StrDup(command))); | 340 i::SmartPointer<char>(i::StrDup(command))); |
| 336 } | 341 } |
| 337 } | 342 } |
| 338 | 343 |
| 339 | 344 |
| 340 } // namespace v8 | 345 } // namespace v8 |
| OLD | NEW |