Version 2.2.9
Allow Object.create to be called with a function (issue 697).
Fixed bug with Date.parse returning a non-NaN value when called on a non date string (issue 696).
Allow unaligned memory accesses on ARM targets that support it (by Subrato K De of CodeAurora <subratokde@codeaurora.org>).
C++ API for retrieving JavaScript stack trace information.
git-svn-id: http://v8.googlecode.com/svn/trunk@4627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/debug.cc b/src/debug.cc
index 729f0ab..bf1f893 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -52,14 +52,13 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
static void PrintLn(v8::Local<v8::Value> value) {
v8::Local<v8::String> s = value->ToString();
- char* data = NewArray<char>(s->Length() + 1);
- if (data == NULL) {
+ ScopedVector<char> data(s->Length() + 1);
+ if (data.start() == NULL) {
V8::FatalProcessOutOfMemory("PrintLn");
return;
}
- s->WriteAscii(data);
- PrintF("%s\n", data);
- DeleteArray(data);
+ s->WriteAscii(data.start());
+ PrintF("%s\n", data.start());
}
@@ -431,8 +430,13 @@
// is set the patching performed by the runtime system will take place in
// the code copy and will therefore have no effect on the running code
// keeping it from using the inlined code.
- if (code->is_keyed_load_stub()) KeyedLoadIC::ClearInlinedVersion(pc());
- if (code->is_keyed_store_stub()) KeyedStoreIC::ClearInlinedVersion(pc());
+ if (code->is_keyed_load_stub()) {
+ KeyedLoadIC::ClearInlinedVersion(pc());
+ } else if (code->is_keyed_store_stub()) {
+ KeyedStoreIC::ClearInlinedVersion(pc());
+ } else if (code->is_load_stub()) {
+ LoadIC::ClearInlinedVersion(pc());
+ }
}
}