From 8831e4ab8fd77b26555cddccfc358ef56a28a2a6 Mon Sep 17 00:00:00 2001 From: "iposva@chromium.org" Date: Thu, 20 Nov 2008 23:53:18 +0000 Subject: [PATCH] - Make sure to not mix allocators by using the correct StrDup function. - Include needed system header. Review URL: http://codereview.chromium.org/11547 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d8.cc b/src/d8.cc index 480d4ae..7b74745 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -26,6 +26,8 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include + #include "d8.h" #include "debug.h" #include "api.h" @@ -77,7 +79,7 @@ i::SmartPointer DumbLineEditor::Prompt(const char* prompt) { char buffer[kBufferSize]; printf("%s", prompt); char* str = fgets(buffer, kBufferSize, stdin); - return i::SmartPointer(str ? i::OS::StrDup(str) : str); + return i::SmartPointer(str ? i::StrDup(str) : str); } -- 2.7.4