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

Unified Diff: src/debug-delay.js

Issue 55011: Optionally send script sources in 'scripts' command response (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-delay.js
===================================================================
--- src/debug-delay.js (revision 1632)
+++ src/debug-delay.js (working copy)
@@ -1645,6 +1645,7 @@
DebugCommandProcessor.prototype.scriptsRequest_ = function(request, response) {
var types = ScriptTypeFlag(Debug.ScriptType.Normal);
+ var includeSource = false;
if (request.arguments) {
// Pull out arguments.
if (!IS_UNDEFINED(request.arguments.types)) {
@@ -1653,6 +1654,10 @@
return response.failed('Invalid types "' + request.arguments.types + '"');
}
}
+
+ if (!IS_UNDEFINED(request.arguments.includeSource)) {
+ includeSource = %ToBoolean(request.arguments.includeSource);
+ }
}
// Collect all scripts in the heap.
@@ -1670,7 +1675,11 @@
script.lineOffset = scripts[i].line_offset;
script.columnOffset = scripts[i].column_offset;
script.lineCount = scripts[i].lineCount();
- script.sourceStart = scripts[i].source.substring(0, 80);
+ if (includeSource) {
+ script.source = scripts[i].source;
+ } else {
+ script.sourceStart = scripts[i].source.substring(0, 80);
+ }
script.sourceLength = scripts[i].source.length;
script.type = scripts[i].type;
response.body.push(script);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698