| 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 11 matching lines...) Expand all  Loading... | 
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 27 | 27 | 
| 28 | 28 | 
| 29 #include "v8.h" | 29 #include "v8.h" | 
| 30 #include "debug-agent.h" | 30 #include "debug-agent.h" | 
| 31 | 31 | 
|  | 32 #ifdef ENABLE_DEBUGGER_SUPPORT | 
| 32 namespace v8 { namespace internal { | 33 namespace v8 { namespace internal { | 
| 33 | 34 | 
| 34 |  | 
| 35 // Public V8 debugger API message handler function. This function just delegates | 35 // Public V8 debugger API message handler function. This function just delegates | 
| 36 // to the debugger agent through it's data parameter. | 36 // to the debugger agent through it's data parameter. | 
| 37 void DebuggerAgentMessageHandler(const uint16_t* message, int length, | 37 void DebuggerAgentMessageHandler(const uint16_t* message, int length, | 
| 38                                  void *data) { | 38                                  void *data) { | 
| 39   reinterpret_cast<DebuggerAgent*>(data)->DebuggerMessage(message, length); | 39   reinterpret_cast<DebuggerAgent*>(data)->DebuggerMessage(message, length); | 
| 40 } | 40 } | 
| 41 | 41 | 
| 42 | 42 | 
| 43 // Debugger agent main thread. | 43 // Debugger agent main thread. | 
| 44 void DebuggerAgent::Run() { | 44 void DebuggerAgent::Run() { | 
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 403   while (total_received < len) { | 403   while (total_received < len) { | 
| 404     int received = conn->Receive(data + total_received, len - total_received); | 404     int received = conn->Receive(data + total_received, len - total_received); | 
| 405     if (received <= 0) { | 405     if (received <= 0) { | 
| 406       return total_received; | 406       return total_received; | 
| 407     } | 407     } | 
| 408     total_received += received; | 408     total_received += received; | 
| 409   } | 409   } | 
| 410   return total_received; | 410   return total_received; | 
| 411 } | 411 } | 
| 412 | 412 | 
|  | 413 } }  // namespace v8::internal | 
| 413 | 414 | 
| 414 } }  // namespace v8::internal | 415 #endif  // ENABLE_DEBUGGER_SUPPORT | 
| OLD | NEW | 
|---|