Commit 8831e4ab authored by iposva@chromium.org's avatar iposva@chromium.org

- 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
parent 3fc91f93
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment