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

Unified Diff: src/messages.js

Issue 1694011: Adds C++ API for retrieving a stack trace without running JavaScript (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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/api.cc ('k') | src/top.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
===================================================================
--- src/messages.js (revision 4556)
+++ src/messages.js (working copy)
@@ -42,6 +42,9 @@
var kVowelSounds = 0;
var kCapitalVowelSounds = 0;
+// Matches Messages::kNoLineNumberInfo from v8.h
+var kNoLineNumberInfo = 0;
+
// If this object gets passed to an error constructor the error will
// get an accessor for .message that constructs a descriptive error
// message on access.
@@ -203,9 +206,9 @@
function GetLineNumber(message) {
- if (message.startPos == -1) return -1;
+ if (message.startPos == -1) return kNoLineNumberInfo;
var location = message.script.locationFromPosition(message.startPos, true);
- if (location == null) return -1;
+ if (location == null) return kNoLineNumberInfo;
return location.line + 1;
}
« no previous file with comments | « src/api.cc ('k') | src/top.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698