| 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 | 1962 |
| 1963 void Debug::AfterGarbageCollection() { | 1963 void Debug::AfterGarbageCollection() { |
| 1964 // Generate events for collected scripts. | 1964 // Generate events for collected scripts. |
| 1965 if (script_cache_ != NULL) { | 1965 if (script_cache_ != NULL) { |
| 1966 script_cache_->ProcessCollectedScripts(); | 1966 script_cache_->ProcessCollectedScripts(); |
| 1967 } | 1967 } |
| 1968 } | 1968 } |
| 1969 | 1969 |
| 1970 | 1970 |
| 1971 Debugger::Debugger(Isolate* isolate) | 1971 Debugger::Debugger(Isolate* isolate) |
| 1972 : debugger_access_(OS::CreateMutex()), | 1972 : debugger_access_(isolate->debugger_access()), |
| 1973 event_listener_(Handle<Object>()), | 1973 event_listener_(Handle<Object>()), |
| 1974 event_listener_data_(Handle<Object>()), | 1974 event_listener_data_(Handle<Object>()), |
| 1975 compiling_natives_(false), | 1975 compiling_natives_(false), |
| 1976 is_loading_debugger_(false), | 1976 is_loading_debugger_(false), |
| 1977 never_unload_debugger_(false), | 1977 never_unload_debugger_(false), |
| 1978 message_handler_(NULL), | 1978 message_handler_(NULL), |
| 1979 debugger_unload_pending_(false), | 1979 debugger_unload_pending_(false), |
| 1980 host_dispatch_handler_(NULL), | 1980 host_dispatch_handler_(NULL), |
| 1981 dispatch_handler_access_(OS::CreateMutex()), | 1981 dispatch_handler_access_(OS::CreateMutex()), |
| 1982 debug_message_dispatch_handler_(NULL), | 1982 debug_message_dispatch_handler_(NULL), |
| 1983 message_dispatch_helper_thread_(NULL), | 1983 message_dispatch_helper_thread_(NULL), |
| 1984 host_dispatch_micros_(100 * 1000), | 1984 host_dispatch_micros_(100 * 1000), |
| 1985 agent_(NULL), | 1985 agent_(NULL), |
| 1986 command_queue_(isolate->logger(), kQueueInitialSize), | 1986 command_queue_(isolate->logger(), kQueueInitialSize), |
| 1987 command_received_(OS::CreateSemaphore(0)), | 1987 command_received_(OS::CreateSemaphore(0)), |
| 1988 event_command_queue_(isolate->logger(), kQueueInitialSize), | 1988 event_command_queue_(isolate->logger(), kQueueInitialSize), |
| 1989 isolate_(isolate) { | 1989 isolate_(isolate) { |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 | 1992 |
| 1993 Debugger::~Debugger() { | 1993 Debugger::~Debugger() { |
| 1994 delete debugger_access_; | |
| 1995 debugger_access_ = 0; | |
| 1996 delete dispatch_handler_access_; | 1994 delete dispatch_handler_access_; |
| 1997 dispatch_handler_access_ = 0; | 1995 dispatch_handler_access_ = 0; |
| 1998 delete command_received_; | 1996 delete command_received_; |
| 1999 command_received_ = 0; | 1997 command_received_ = 0; |
| 2000 } | 1998 } |
| 2001 | 1999 |
| 2002 | 2000 |
| 2003 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, | 2001 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, |
| 2004 int argc, Object*** argv, | 2002 int argc, Object*** argv, |
| 2005 bool* caught_exception) { | 2003 bool* caught_exception) { |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3132 { | 3130 { |
| 3133 Locker locker; | 3131 Locker locker; |
| 3134 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3132 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3135 } | 3133 } |
| 3136 } | 3134 } |
| 3137 } | 3135 } |
| 3138 | 3136 |
| 3139 #endif // ENABLE_DEBUGGER_SUPPORT | 3137 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3140 | 3138 |
| 3141 } } // namespace v8::internal | 3139 } } // namespace v8::internal |
| OLD | NEW |