Commit 24ac817d authored by oliver@apple.com's avatar oliver@apple.com

2013-04-22 Oliver Hunt <oliver@apple.com>

        Perform null check before trying to use the result of readline()

        RS=Gavin

        * jsc.cpp:
        (runInteractive):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0f935855
2013-04-22 Oliver Hunt <oliver@apple.com>
Perform null check before trying to use the result of readline()
RS=Gavin
* jsc.cpp:
(runInteractive):
2013-04-22 Oliver Hunt <oliver@apple.com>
Fix assertions to account for new Vector layout
......@@ -621,14 +621,15 @@ static void runInteractive(GlobalObject* globalObject)
do {
error = ParserError();
char* line = readline(source.isEmpty() ? interactivePrompt : "... ");
shouldQuit = !line;
if (!line)
break;
source = source + line;
source = source + '\n';
checkSyntax(globalObject->globalExec(), makeSource(source, interpreterName), error);
shouldQuit = !line;
if (!line || !line[0])
if (!line[0])
break;
if (line[0])
add_history(line);
add_history(line);
} while (error.m_syntaxErrorType == ParserError::SyntaxErrorRecoverable);
if (error.m_type != ParserError::ErrorNone) {
......
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