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 20 matching lines...) Expand all Loading... |
31 #include "debug.h" | 31 #include "debug.h" |
32 #include "debug-agent.h" | 32 #include "debug-agent.h" |
33 #include "platform/socket.h" | 33 #include "platform/socket.h" |
34 | 34 |
35 namespace v8 { | 35 namespace v8 { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
38 // Public V8 debugger API message handler function. This function just delegates | 38 // Public V8 debugger API message handler function. This function just delegates |
39 // to the debugger agent through it's data parameter. | 39 // to the debugger agent through it's data parameter. |
40 void DebuggerAgentMessageHandler(const v8::Debug::Message& message) { | 40 void DebuggerAgentMessageHandler(const v8::Debug::Message& message) { |
41 DebuggerAgent* agent = Isolate::Current()->debugger_agent_instance(); | 41 Isolate* isolate = reinterpret_cast<Isolate*>(message.GetIsolate()); |
| 42 DebuggerAgent* agent = isolate->debugger_agent_instance(); |
42 ASSERT(agent != NULL); | 43 ASSERT(agent != NULL); |
43 agent->DebuggerMessage(message); | 44 agent->DebuggerMessage(message); |
44 } | 45 } |
45 | 46 |
46 | 47 |
47 DebuggerAgent::DebuggerAgent(Isolate* isolate, const char* name, int port) | 48 DebuggerAgent::DebuggerAgent(Isolate* isolate, const char* name, int port) |
48 : Thread(name), | 49 : Thread(name), |
49 isolate_(isolate), | 50 isolate_(isolate), |
50 name_(StrDup(name)), | 51 name_(StrDup(name)), |
51 port_(port), | 52 port_(port), |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 return total_received; | 494 return total_received; |
494 } | 495 } |
495 total_received += received; | 496 total_received += received; |
496 } | 497 } |
497 return total_received; | 498 return total_received; |
498 } | 499 } |
499 | 500 |
500 } } // namespace v8::internal | 501 } } // namespace v8::internal |
501 | 502 |
502 #endif // ENABLE_DEBUGGER_SUPPORT | 503 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |