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

Side by Side Diff: webkit/glue/devtools/js/debugger_agent.js

Issue 218026: DevTools: autoresume execution on parse errors. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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 | « chrome/test/data/devtools/script_syntax_error.html ('k') | webkit/glue/devtools/js/tests.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 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Provides communication interface to remote v8 debugger. See 6 * @fileoverview Provides communication interface to remote v8 debugger. See
7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol 7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol
8 */ 8 */
9 goog.provide('devtools.DebuggerAgent'); 9 goog.provide('devtools.DebuggerAgent');
10 10
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 783
784 784
785 /** 785 /**
786 * @param {devtools.DebuggerMessage} msg 786 * @param {devtools.DebuggerMessage} msg
787 */ 787 */
788 devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg) { 788 devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg) {
789 // Force scrips panel to be shown first. 789 // Force scrips panel to be shown first.
790 WebInspector.currentPanel = WebInspector.panels.scripts; 790 WebInspector.currentPanel = WebInspector.panels.scripts;
791 791
792 var body = msg.getBody(); 792 var body = msg.getBody();
793 if (this.pauseOnExceptions_) { 793 // No script field in the body means that v8 failed to parse the script. We
794 var body = msg.getBody(); 794 // resume execution on parser errors automatically.
795 if (this.pauseOnExceptions_ && body.script) {
Søren Thygesen Gjesse 2009/09/25 06:28:46 The assumption that if there is no script informat
yurys 2009/09/25 14:01:56 Are there other cases when body.script is undefine
795 var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(body.sourceLine); 796 var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(body.sourceLine);
796 this.createExceptionMessage_(body.script.name, line, body.exception.text); 797 this.createExceptionMessage_(body.script.name, line, body.exception.text);
797 this.requestBacktrace_(); 798 this.requestBacktrace_();
798 } else { 799 } else {
799 this.resumeExecution(); 800 this.resumeExecution();
800 } 801 }
801 }; 802 };
802 803
803 804
804 /** 805 /**
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1474
1474 1475
1475 /** 1476 /**
1476 * @param {number} handle Object handle. 1477 * @param {number} handle Object handle.
1477 * @return {?Object} Returns the object with the handle if it was sent in this 1478 * @return {?Object} Returns the object with the handle if it was sent in this
1478 * message(some objects referenced by handles may be missing in the message). 1479 * message(some objects referenced by handles may be missing in the message).
1479 */ 1480 */
1480 devtools.DebuggerMessage.prototype.lookup = function(handle) { 1481 devtools.DebuggerMessage.prototype.lookup = function(handle) {
1481 return this.refs_[handle]; 1482 return this.refs_[handle];
1482 }; 1483 };
OLDNEW
« no previous file with comments | « chrome/test/data/devtools/script_syntax_error.html ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698