summaryrefslogtreecommitdiffstats
path: root/chrome/nacl
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/nacl')
-rw-r--r--chrome/nacl/nacl_thread.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/nacl/nacl_thread.cc b/chrome/nacl/nacl_thread.cc
index 77b78c7..c1ab76d 100644
--- a/chrome/nacl/nacl_thread.cc
+++ b/chrome/nacl/nacl_thread.cc
@@ -4,6 +4,7 @@
#include "chrome/nacl/nacl_thread.h"
+#include "base/scoped_ptr.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/nacl_messages.h"
@@ -37,10 +38,9 @@ void NaClThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) {
- NaClHandle* array = new NaClHandle[handles.size()];
+ scoped_array<NaClHandle> array(new NaClHandle[handles.size()]);
for (size_t i = 0; i < handles.size(); i++) {
array[i] = nacl::ToNativeHandle(handles[i]);
}
- NaClMainForChromium(static_cast<int>(handles.size()), array);
- delete array;
+ NaClMainForChromium(static_cast<int>(handles.size()), array.get());
}