Merge branch 'master' into master

This commit is contained in:
Ben Jackson 2021-01-09 10:33:38 +00:00 committed by GitHub
commit 205eb7cdb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 70 additions and 11 deletions

View file

@ -344,11 +344,12 @@ def WriteAdapters( all_adapters, to_file=None ):
def InstallGeneric( name, root, gadget ):
extension = os.path.join( root, 'extension' )
extension_path = gadget.get( 'extension_path', 'extension' )
extension = os.path.join( root, extension_path )
for f in gadget.get( 'make_executable', [] ):
MakeExecutable( os.path.join( extension, f ) )
MakeExtensionSymlink( name, root )
MakeExtensionSymlink( name, root, extension_path )
def InstallCppTools( name, root, gadget ):
@ -703,8 +704,8 @@ def ExtractZipTo( file_path, destination, format ):
CheckCall( [ 'tar', 'zxvf', file_path ] )
def MakeExtensionSymlink( name, root ):
MakeSymlink( name, os.path.join( root, 'extension' ) ),
def MakeExtensionSymlink( name, root, extension_path = 'extension' ):
MakeSymlink( name, os.path.join( root, extension_path ) ),
def MakeSymlink( link, pointing_to, in_folder = None ):

View file

@ -188,11 +188,12 @@ class StackTraceView( object ):
return
def consume_threads( message ):
requesting = False
if self._requesting_threads == StackTraceView.ThreadRequestState.PENDING:
# We may have hit a thread event, so try again.
self._requesting_threads = StackTraceView.ThreadRequestState.NO
self.LoadThreads( *self._pending_thread_request )
return
requesting = True
self._requesting_threads = StackTraceView.ThreadRequestState.NO
self._pending_thread_request = None
@ -211,8 +212,6 @@ class StackTraceView( object ):
stoppedThreadId = stopEvent.get( 'threadId' )
allThreadsStopped = stopEvent.get( 'allThreadsStopped', False )
requesting = False
# FIXME: This is horribly inefficient
for t in message[ 'body' ][ 'threads' ]:
thread = None
@ -240,7 +239,10 @@ class StackTraceView( object ):
# If this is a stopped event, load the stack trace for the "current"
# thread. Don't do this on other thrads requests because some servers
# just break when that happens.
if infer_current_frame:
#
# Don't do this if we're also satisfying a cached request already (we'll
# do it then)
if infer_current_frame and not requesting:
if thread.id == self._current_thread:
if thread.CanExpand():
self._LoadStackTrace( thread, True, reason )