• sgjesse@chromium.org's avatar
    Change handling of debugger unloading. · 1f7a7d9c
    sgjesse@chromium.org authored
    Add a semaphore for accessing debugger varaibles which can be changed from a different thread. This is mainly the debug message handler which can be set to NULL to disconnect the debugger.
    
    Control the unloading of the debugger from the V8 thread. Before the debugger unload was called from the thread setting the debug message handler to NULL. This was not safe as this involves calling into V8. This change handles the unloading of the debugger either when entering a debugger event and the debugger was disconnected while the debugger was not active or when leaving the debugger and the debugger was disconnected while the debugger was active.
    
    Add a flag to avoid unloading the debugger if debugger code is used by the application for other purposes than debugging.
    
    Added tests for clearing the debug message handler.
    Review URL: http://codereview.chromium.org/56102
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    1f7a7d9c
test-debug.cc 136 KB