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