| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 if (session_ != NULL) { | 99 if (session_ != NULL) { |
| 100 static const char* message = "Remote debugging session already active\r\n"; | 100 static const char* message = "Remote debugging session already active\r\n"; |
| 101 | 101 |
| 102 client->Send(message, strlen(message)); | 102 client->Send(message, strlen(message)); |
| 103 delete client; | 103 delete client; |
| 104 return; | 104 return; |
| 105 } | 105 } |
| 106 | 106 |
| 107 // Create a new session and hook up the debug message handler. | 107 // Create a new session and hook up the debug message handler. |
| 108 session_ = new DebuggerAgentSession(this, client); | 108 session_ = new DebuggerAgentSession(this, client); |
| 109 v8::Debug::SetMessageHandler(DebuggerAgentMessageHandler); | 109 v8::Debug::SetMessageHandler2(DebuggerAgentMessageHandler); |
| 110 session_->Start(); | 110 session_->Start(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 | 113 |
| 114 void DebuggerAgent::CloseSession() { | 114 void DebuggerAgent::CloseSession() { |
| 115 ScopedLock with(session_access_); | 115 ScopedLock with(session_access_); |
| 116 | 116 |
| 117 // Terminate the session. | 117 // Terminate the session. |
| 118 if (session_ != NULL) { | 118 if (session_ != NULL) { |
| 119 session_->Shutdown(); | 119 session_->Shutdown(); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 return total_received; | 408 return total_received; |
| 409 } | 409 } |
| 410 total_received += received; | 410 total_received += received; |
| 411 } | 411 } |
| 412 return total_received; | 412 return total_received; |
| 413 } | 413 } |
| 414 | 414 |
| 415 } } // namespace v8::internal | 415 } } // namespace v8::internal |
| 416 | 416 |
| 417 #endif // ENABLE_DEBUGGER_SUPPORT | 417 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |