| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 | 1979 |
| 1980 | 1980 |
| 1981 void Debug::AfterGarbageCollection() { | 1981 void Debug::AfterGarbageCollection() { |
| 1982 // Generate events for collected scripts. | 1982 // Generate events for collected scripts. |
| 1983 if (script_cache_ != NULL) { | 1983 if (script_cache_ != NULL) { |
| 1984 script_cache_->ProcessCollectedScripts(); | 1984 script_cache_->ProcessCollectedScripts(); |
| 1985 } | 1985 } |
| 1986 } | 1986 } |
| 1987 | 1987 |
| 1988 | 1988 |
| 1989 Debugger::Debugger() | 1989 Debugger::Debugger(Isolate* isolate) |
| 1990 : debugger_access_(OS::CreateMutex()), | 1990 : debugger_access_(isolate->debugger_access()), |
| 1991 event_listener_(Handle<Object>()), | 1991 event_listener_(Handle<Object>()), |
| 1992 event_listener_data_(Handle<Object>()), | 1992 event_listener_data_(Handle<Object>()), |
| 1993 compiling_natives_(false), | 1993 compiling_natives_(false), |
| 1994 is_loading_debugger_(false), | 1994 is_loading_debugger_(false), |
| 1995 never_unload_debugger_(false), | 1995 never_unload_debugger_(false), |
| 1996 message_handler_(NULL), | 1996 message_handler_(NULL), |
| 1997 debugger_unload_pending_(false), | 1997 debugger_unload_pending_(false), |
| 1998 host_dispatch_handler_(NULL), | 1998 host_dispatch_handler_(NULL), |
| 1999 dispatch_handler_access_(OS::CreateMutex()), | 1999 dispatch_handler_access_(OS::CreateMutex()), |
| 2000 debug_message_dispatch_handler_(NULL), | 2000 debug_message_dispatch_handler_(NULL), |
| 2001 message_dispatch_helper_thread_(NULL), | 2001 message_dispatch_helper_thread_(NULL), |
| 2002 host_dispatch_micros_(100 * 1000), | 2002 host_dispatch_micros_(100 * 1000), |
| 2003 agent_(NULL), | 2003 agent_(NULL), |
| 2004 command_queue_(kQueueInitialSize), | 2004 command_queue_(kQueueInitialSize), |
| 2005 command_received_(OS::CreateSemaphore(0)), | 2005 command_received_(OS::CreateSemaphore(0)), |
| 2006 event_command_queue_(kQueueInitialSize) { | 2006 event_command_queue_(kQueueInitialSize), |
| 2007 isolate_(isolate) { |
| 2007 } | 2008 } |
| 2008 | 2009 |
| 2009 | 2010 |
| 2010 Debugger::~Debugger() { | 2011 Debugger::~Debugger() { |
| 2011 delete debugger_access_; | |
| 2012 debugger_access_ = 0; | |
| 2013 delete dispatch_handler_access_; | 2012 delete dispatch_handler_access_; |
| 2014 dispatch_handler_access_ = 0; | 2013 dispatch_handler_access_ = 0; |
| 2015 delete command_received_; | 2014 delete command_received_; |
| 2016 command_received_ = 0; | 2015 command_received_ = 0; |
| 2017 } | 2016 } |
| 2018 | 2017 |
| 2019 | 2018 |
| 2020 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, | 2019 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, |
| 2021 int argc, Object*** argv, | 2020 int argc, Object*** argv, |
| 2022 bool* caught_exception) { | 2021 bool* caught_exception) { |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 { | 3177 { |
| 3179 Locker locker; | 3178 Locker locker; |
| 3180 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3179 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3181 } | 3180 } |
| 3182 } | 3181 } |
| 3183 } | 3182 } |
| 3184 | 3183 |
| 3185 #endif // ENABLE_DEBUGGER_SUPPORT | 3184 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3186 | 3185 |
| 3187 } } // namespace v8::internal | 3186 } } // namespace v8::internal |
| OLD | NEW |