summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/Script.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/Script.js')
-rw-r--r--WebCore/inspector/front-end/Script.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/WebCore/inspector/front-end/Script.js b/WebCore/inspector/front-end/Script.js
index e6413a9..79004f3 100644
--- a/WebCore/inspector/front-end/Script.js
+++ b/WebCore/inspector/front-end/Script.js
@@ -42,9 +42,20 @@ WebInspector.Script = function(sourceID, sourceURL, source, startingLine, errorL
var match = pattern.exec(source);
if (match)
- this.sourceURL = WebInspector.UIString("(program): %s", match[1]);
+ this.sourceURL = match[1];
}
}
WebInspector.Script.prototype = {
+ get linesCount()
+ {
+ if (!this.source)
+ return 0;
+ this._linesCount = 0;
+ var lastIndex = this.source.indexOf("\n");
+ while (lastIndex !== -1) {
+ lastIndex = this.source.indexOf("\n", lastIndex + 1)
+ this._linesCount++;
+ }
+ }
}