From: iposva@chromium.org Date: Thu, 20 Nov 2008 23:53:18 +0000 (+0000) Subject: - Make sure to not mix allocators by using the correct StrDup function. X-Git-Tag: upstream/4.7.83~24984 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8831e4ab8fd77b26555cddccfc358ef56a28a2a6;p=platform%2Fupstream%2Fv8.git - 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 --- diff --git a/src/d8.cc b/src/d8.cc index 480d4ae94..7b7474591 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); }