Reviewed by Sam.
Bug 17547: JavaScriptCore print() differs from Spidermonkey Behavior
<https://bugs.webkit.org/show_bug.cgi?id=17547>
* kjs/testkjs.cpp:
(functionPrint):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34428
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-06-07 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Sam.
+
+ Bug 17547: JavaScriptCore print() differs from Spidermonkey Behavior
+ <https://bugs.webkit.org/show_bug.cgi?id=17547>
+
+ * kjs/testkjs.cpp:
+ (functionPrint):
+
2008-06-07 Alexey Proskuryakov <ap@webkit.org>
More build fixes.
JSValue* functionPrint(ExecState* exec, JSObject*, const List& args)
{
- printf("%s\n", args[0]->toString(exec).UTF8String().c_str());
+ if (!args.isEmpty())
+ printf("%s\n", args[0]->toString(exec).UTF8String().c_str());
+ else
+ putchar('\n');
+
fflush(stdout);
return jsUndefined();
}