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

Unified Diff: src/messages.js

Issue 1213783002: Put getter functions on Script line-endings objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test Created 5 years, 6 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 | test/cctest/cctest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index 5cd10563242ab1e9ec1ba7b51f06e5bf9208cc2d..d7ca7cd6479bd85bbdecf3647dc941ae4c9460a1 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -396,6 +396,16 @@ function ScriptLineCount() {
/**
+ * Returns the position of the nth line end.
+ * @return {number}
+ * Zero-based position of the nth line end in the script.
+ */
+function ScriptLineEnd(n) {
+ return this.line_ends[n];
+}
+
+
+/**
* If sourceURL comment is available returns sourceURL comment contents.
* Otherwise, script name is returned. See
* http://fbug.googlecode.com/svn/branches/firebug1.1/docs/ReleaseNotes_1.1.txt
@@ -426,7 +436,8 @@ utils.SetUpLockedPrototype(Script, [
"sourceSlice", ScriptSourceSlice,
"sourceLine", ScriptSourceLine,
"lineCount", ScriptLineCount,
- "nameOrSourceURL", ScriptNameOrSourceURL
+ "nameOrSourceURL", ScriptNameOrSourceURL,
+ "lineEnd", ScriptLineEnd
]
);
« no previous file with comments | « no previous file | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698