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]) + |