summaryrefslogtreecommitdiff
path: root/deps/v8/src/platform-freebsd.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-05-10 09:58:20 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-05-10 09:58:20 -0700
commit615d8906226ffc56238b44141cdb3374f47e805a (patch)
tree3850f314701edf5156ec52f296eac9f38959bbfe /deps/v8/src/platform-freebsd.cc
parent8ab238e7de8429961ce4d6fd9114555e5df90a13 (diff)
downloadnode-new-615d8906226ffc56238b44141cdb3374f47e805a.tar.gz
Upgrade V8 to 2.2.9
Diffstat (limited to 'deps/v8/src/platform-freebsd.cc')
-rw-r--r--deps/v8/src/platform-freebsd.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/deps/v8/src/platform-freebsd.cc b/deps/v8/src/platform-freebsd.cc
index 67e52ce947..b1075cf321 100644
--- a/deps/v8/src/platform-freebsd.cc
+++ b/deps/v8/src/platform-freebsd.cc
@@ -286,14 +286,12 @@ void OS::LogSharedLibraryAddresses() {
int OS::StackWalk(Vector<OS::StackFrame> frames) {
int frames_size = frames.length();
- void** addresses = NewArray<void*>(frames_size);
+ ScopedVector<void*> addresses(frames_size);
- int frames_count = backtrace(addresses, frames_size);
+ int frames_count = backtrace(addresses.start(), frames_size);
- char** symbols;
- symbols = backtrace_symbols(addresses, frames_count);
+ char** symbols = backtrace_symbols(addresses, frames_count);
if (symbols == NULL) {
- DeleteArray(addresses);
return kStackWalkError;
}
@@ -308,7 +306,6 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) {
frames[i].text[kStackWalkMaxTextLen - 1] = '\0';
}
- DeleteArray(addresses);
free(symbols);
return frames_count;