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 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 hack[0] = 0; | 1993 hack[0] = 0; |
1994 hack[1] = reinterpret_cast<uint32_t>(dispatch) >> 16; | 1994 hack[1] = reinterpret_cast<uint32_t>(dispatch) >> 16; |
1995 hack[2] = reinterpret_cast<uint32_t>(dispatch) & 0xFFFF; | 1995 hack[2] = reinterpret_cast<uint32_t>(dispatch) & 0xFFFF; |
1996 Logger::DebugTag("Put dispatch on command_queue."); | 1996 Logger::DebugTag("Put dispatch on command_queue."); |
1997 command_queue_.Put(Vector<uint16_t>(hack, 3).Clone()); | 1997 command_queue_.Put(Vector<uint16_t>(hack, 3).Clone()); |
1998 command_received_->Signal(); | 1998 command_received_->Signal(); |
1999 } | 1999 } |
2000 | 2000 |
2001 | 2001 |
2002 void Debugger::UpdateActiveDebugger() { | 2002 void Debugger::UpdateActiveDebugger() { |
2003 set_debugger_active((message_thread_ != NULL && | 2003 set_debugger_active(message_handler_ != NULL || !event_listener_.is_null()); |
2004 message_handler_ != NULL) || | |
2005 !event_listener_.is_null()); | |
2006 if (!debugger_active() && message_thread_) { | 2004 if (!debugger_active() && message_thread_) { |
2007 // Send an empty command to the debugger if in a break to make JavaScript | 2005 // Send an empty command to the debugger if in a break to make JavaScript |
2008 // run again if the debugger is closed. | 2006 // run again if the debugger is closed. |
2009 ProcessCommand(Vector<const uint16_t>::empty()); | 2007 ProcessCommand(Vector<const uint16_t>::empty()); |
2010 } | 2008 } |
2011 if (!debugger_active()) { | 2009 if (!debugger_active()) { |
2012 Debug::Unload(); | 2010 Debug::Unload(); |
2013 } | 2011 } |
2014 } | 2012 } |
2015 | 2013 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2159 } | 2157 } |
2160 | 2158 |
2161 | 2159 |
2162 void LockingMessageQueue::Clear() { | 2160 void LockingMessageQueue::Clear() { |
2163 ScopedLock sl(lock_); | 2161 ScopedLock sl(lock_); |
2164 queue_.Clear(); | 2162 queue_.Clear(); |
2165 } | 2163 } |
2166 | 2164 |
2167 | 2165 |
2168 } } // namespace v8::internal | 2166 } } // namespace v8::internal |
OLD | NEW |