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

Unified Diff: src/js/messages.js

Issue 2224973002: Move remaining Message functions to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 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 | « src/js/macros.py ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index de7ce7678ac430a8a752d8abf141af7e8067f3de..3ea2bef5ad49d022dc036a780c55a888ff58f387 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -73,43 +73,4 @@ utils.SetUpLockedPrototype(Script, [
]
);
-// -------------------------------------------------------------------
-// Message
-
-function GetLineNumber(message) {
- var start_position = %MessageGetStartPosition(message);
- if (start_position == -1) return kNoLineNumberInfo;
- var script = %MessageGetScript(message);
- var location = script.locationFromPosition(start_position, true);
- if (location == null) return kNoLineNumberInfo;
- return location.line + 1;
-}
-
-
-//Returns the offset of the given position within the containing line.
-function GetColumnNumber(message) {
- var script = %MessageGetScript(message);
- var start_position = %MessageGetStartPosition(message);
- var location = script.locationFromPosition(start_position, true);
- if (location == null) return -1;
- return location.column;
-}
-
-
-// Returns the source code line containing the given source
-// position, or the empty string if the position is invalid.
-function GetSourceLine(message) {
- var script = %MessageGetScript(message);
- var start_position = %MessageGetStartPosition(message);
- var location = script.locationFromPosition(start_position, true);
- if (location == null) return "";
- return location.sourceText;
-}
-
-%InstallToContext([
- "message_get_column_number", GetColumnNumber,
- "message_get_line_number", GetLineNumber,
- "message_get_source_line", GetSourceLine,
-]);
-
});
« no previous file with comments | « src/js/macros.py ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698