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

Unified Diff: src/runtime.cc

Issue 274080: Add "Version" command (Closed)
Patch Set: clean-up Created 11 years, 2 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/runtime.h ('k') | test/mjsunit/debug-version.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 9eeffd10c0f1097d60226c3753d402c101fcc422..b557ed5c3b479fecc141e81b0b3b7c445ff3d3c6 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7659,6 +7659,18 @@ static Object* Runtime_CollectStackTrace(Arguments args) {
}
+// Returns V8 version as a string.
+static Object* Runtime_GetV8Version(Arguments args) {
+ ASSERT_EQ(args.length(), 0);
+
+ NoHandleAllocation ha;
+
+ const char* version_string = v8::V8::GetVersion();
+
+ return Heap::AllocateStringFromAscii(CStrVector(version_string), NOT_TENURED);
+}
+
+
static Object* Runtime_Abort(Arguments args) {
ASSERT(args.length() == 2);
OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) +
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-version.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698