Skip to content

Commit

Permalink
When setScriptSource and not at a break, WebKit returns an empty call…
Browse files Browse the repository at this point in the history
…stack object. Prevent this from being treated like a break notification, ie., it should not draw the step buttons and the pause overlay.
  • Loading branch information
danmoseley committed Oct 18, 2015
1 parent eb1a9bd commit 6bbbb4b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions swi.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,24 +924,24 @@ def close_all_our_windows():

def update_stack(data):

if not channel: # race with shutdown
return

if (not 'callFrames' in data):
return;
return

if not channel: # race with shutdown
callFrames = data['callFrames']
if len(callFrames) == 0: # Chrome can return none eg on setScriptSource when not broken
return

if utils.get_setting('enable_pause_overlay'):
channel.send(webkit.Debugger.setOverlayMessage('Paused in Sublime Web Inspector'))

window.set_layout(utils.get_setting('stack_layout'))

callFrames = data['callFrames']

console_show_stack(callFrames)

if len(callFrames) > 0: # Chrome can return none
callFrame = callFrames[0]
change_to_call_frame(callFrame)

change_to_call_frame(callFrames[0])


def change_to_call_frame(callFrame):
Expand Down

0 comments on commit 6bbbb4b

Please sign in to comment.