OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 5898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5909 delete server_; | 5909 delete server_; |
5910 delete listening_; | 5910 delete listening_; |
5911 } | 5911 } |
5912 | 5912 |
5913 void Run(); | 5913 void Run(); |
5914 void WaitForListening() { listening_->Wait(); } | 5914 void WaitForListening() { listening_->Wait(); } |
5915 char* body() { return *body_; } | 5915 char* body() { return *body_; } |
5916 | 5916 |
5917 private: | 5917 private: |
5918 int port_; | 5918 int port_; |
5919 i::SmartPointer<char> body_; | 5919 i::SmartArrayPointer<char> body_; |
5920 i::Socket* server_; // Server socket used for bind/accept. | 5920 i::Socket* server_; // Server socket used for bind/accept. |
5921 i::Socket* client_; // Single client connection used by the test. | 5921 i::Socket* client_; // Single client connection used by the test. |
5922 i::Semaphore* listening_; // Signalled when the server is in listen mode. | 5922 i::Semaphore* listening_; // Signalled when the server is in listen mode. |
5923 }; | 5923 }; |
5924 | 5924 |
5925 | 5925 |
5926 void DebuggerAgentProtocolServerThread::Run() { | 5926 void DebuggerAgentProtocolServerThread::Run() { |
5927 bool ok; | 5927 bool ok; |
5928 | 5928 |
5929 // Create the server socket and bind it to the requested port. | 5929 // Create the server socket and bind it to the requested port. |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7295 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); | 7295 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); |
7296 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); | 7296 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); |
7297 | 7297 |
7298 // Get rid of the debug event listener. | 7298 // Get rid of the debug event listener. |
7299 v8::Debug::SetDebugEventListener(NULL); | 7299 v8::Debug::SetDebugEventListener(NULL); |
7300 CheckDebuggerUnloaded(); | 7300 CheckDebuggerUnloaded(); |
7301 } | 7301 } |
7302 | 7302 |
7303 | 7303 |
7304 #endif // ENABLE_DEBUGGER_SUPPORT | 7304 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |