[Webkit-unassigned] [Bug 26904] New: Suppress 'undefined' in JSC program display
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 1 14:21:18 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26904
Summary: Suppress 'undefined' in JSC program display
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Trivial
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bfulgham at webkit.org
If you play with the JSC program, you can perform various calculations and see
results:
> 1 + 2
3
> "hello"
hello
The problem is if you attempt to create a variable binding, which does not
return a value. In this case, the JSC program reports 'undefined', which is a
surprising result and might confuse a user into thinking an error has occurred.
For example:
> var add2 = function(arg) { return arg + 2; }
undefined
> add2(15)
17
It seems like it would be better if the transcript looked like the following:
> 1 + 2
3
> var add3 = function(arg) { return arg + 3; }
> add3(15)
18
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list