- Make sure to not mix allocators by using the correct StrDup function.
authoriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 20 Nov 2008 23:53:18 +0000 (23:53 +0000)
committeriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 20 Nov 2008 23:53:18 +0000 (23:53 +0000)
- 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

index 480d4ae..7b74745 100644 (file)
--- 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 <stdlib.h>
+
 #include "d8.h"
 #include "debug.h"
 #include "api.h"
@@ -77,7 +79,7 @@ i::SmartPointer<char> DumbLineEditor::Prompt(const char* prompt) {
   char buffer[kBufferSize];
   printf("%s", prompt);
   char* str = fgets(buffer, kBufferSize, stdin);
-  return i::SmartPointer<char>(str ? i::OS::StrDup(str) : str);
+  return i::SmartPointer<char>(str ? i::StrDup(str) : str);
 }