Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: Source/devtools/front_end/DebuggerModel.js

Issue 102833003: DevTools: Add a checkbox to enable async stacks in the sidebar header. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/CallStackSidebarPane.js ('k') | Source/devtools/front_end/Placard.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 /** @type {!Object.<!string, !Array.<!WebInspector.Script>>} */ 43 /** @type {!Object.<!string, !Array.<!WebInspector.Script>>} */
44 this._scriptsBySourceURL = {}; 44 this._scriptsBySourceURL = {};
45 45
46 this._canSetScriptSource = false; 46 this._canSetScriptSource = false;
47 this._breakpointsActive = true; 47 this._breakpointsActive = true;
48 48
49 WebInspector.settings.pauseOnExceptionStateString = WebInspector.settings.cr eateSetting("pauseOnExceptionStateString", WebInspector.DebuggerModel.PauseOnExc eptionsState.DontPauseOnExceptions); 49 WebInspector.settings.pauseOnExceptionStateString = WebInspector.settings.cr eateSetting("pauseOnExceptionStateString", WebInspector.DebuggerModel.PauseOnExc eptionsState.DontPauseOnExceptions);
50 WebInspector.settings.pauseOnExceptionStateString.addChangeListener(this._pa useOnExceptionStateChanged, this); 50 WebInspector.settings.pauseOnExceptionStateString.addChangeListener(this._pa useOnExceptionStateChanged, this);
51 51
52 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt ackTracesStateChanged, this); 52 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt ackTracesStateChanged, this);
53 WebInspector.settings.maxAsyncStackTraceDepth.addChangeListener(this._asyncS tackTracesStateChanged, this);
54 53
55 this.enableDebugger(); 54 this.enableDebugger();
56 55
57 WebInspector.DebuggerModel.applySkipStackFrameSettings(); 56 WebInspector.DebuggerModel.applySkipStackFrameSettings();
58 } 57 }
59 58
60 // Keep these in sync with WebCore::ScriptDebugServer 59 // Keep these in sync with WebCore::ScriptDebugServer
61 WebInspector.DebuggerModel.PauseOnExceptionsState = { 60 WebInspector.DebuggerModel.PauseOnExceptionsState = {
62 DontPauseOnExceptions : "none", 61 DontPauseOnExceptions : "none",
63 PauseOnAllExceptions : "all", 62 PauseOnAllExceptions : "all",
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled); 172 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled);
174 }, 173 },
175 174
176 _pauseOnExceptionStateChanged: function() 175 _pauseOnExceptionStateChanged: function()
177 { 176 {
178 DebuggerAgent.setPauseOnExceptions(WebInspector.settings.pauseOnExceptio nStateString.get()); 177 DebuggerAgent.setPauseOnExceptions(WebInspector.settings.pauseOnExceptio nStateString.get());
179 }, 178 },
180 179
181 _asyncStackTracesStateChanged: function() 180 _asyncStackTracesStateChanged: function()
182 { 181 {
182 const maxAsyncStackChainDepth = 4;
183 var enabled = WebInspector.settings.enableAsyncStackTraces.get(); 183 var enabled = WebInspector.settings.enableAsyncStackTraces.get();
184 var depth = enabled ? Number(WebInspector.settings.maxAsyncStackTraceDep th.get()) : 0; 184 DebuggerAgent.setAsyncCallStackDepth(enabled ? maxAsyncStackChainDepth : 0);
185 DebuggerAgent.setAsyncCallStackDepth(depth);
186 }, 185 },
187 186
188 _debuggerWasDisabled: function() 187 _debuggerWasDisabled: function()
189 { 188 {
190 this._debuggerEnabled = false; 189 this._debuggerEnabled = false;
191 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasDisabled); 190 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasDisabled);
192 }, 191 },
193 192
194 /** 193 /**
195 * @param {!WebInspector.DebuggerModel.Location} rawLocation 194 * @param {!WebInspector.DebuggerModel.Location} rawLocation
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 this.callFrames[i].dispose(); 1054 this.callFrames[i].dispose();
1056 if (this.asyncStackTrace) 1055 if (this.asyncStackTrace)
1057 this.asyncStackTrace.dispose(); 1056 this.asyncStackTrace.dispose();
1058 } 1057 }
1059 } 1058 }
1060 1059
1061 /** 1060 /**
1062 * @type {?WebInspector.DebuggerModel} 1061 * @type {?WebInspector.DebuggerModel}
1063 */ 1062 */
1064 WebInspector.debuggerModel = null; 1063 WebInspector.debuggerModel = null;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/CallStackSidebarPane.js ('k') | Source/devtools/front_end/Placard.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698