RESOLVED FIXED Bug 51528
[v8] ScriptController::evaluate returns empty result for undefined. Can't distinguish errors from undefined results.
https://bugs.webkit.org/show_bug.cgi?id=51528
Summary [v8] ScriptController::evaluate returns empty result for undefined. Can't dis...
Tom R
Reported 2010-12-23 03:02:15 PST
ScriptController::evaluate contains: if (object.IsEmpty() || object->IsUndefined()) return ScriptValue(); Should be: if (object.IsEmpty()) return ScriptValue(); Returning an empty ScriptValue should indicate an error. As undefined is a valid return value for void calls returning an empty ScriptValue makes it impossible to distinguish undefined results from errors. Related mailing list thread: https://lists.webkit.org/pipermail/webkit-dev/2010-December/015417.html
Attachments
fix, allow the "undefined" v8 object to be returned (511 bytes, patch)
2010-12-23 06:39 PST, Tom R
eric: review-
Patch (1.20 KB, patch)
2011-02-22 12:04 PST, anthony taranto
no flags
Tom R
Comment 1 2010-12-23 06:39:17 PST
Created attachment 77331 [details] fix, allow the "undefined" v8 object to be returned
Marshall Greenblatt
Comment 2 2011-01-07 10:29:08 PST
Hi Yury, please review this patch.
Eric Seidel (no email)
Comment 3 2011-01-11 03:08:49 PST
Comment on attachment 77331 [details] fix, allow the "undefined" v8 object to be returned This patch was not created correctly. Please create from a WebKit checkout. Also, all patches require a ChangeLog. webkit-patch upload will walk you through much of this.
Yury Semikhatsky
Comment 4 2011-01-11 03:30:55 PST
Hi Tom, please add proper ChangeLog entry to the patch as Eric suggested, otherwise the change looks good to me. (In reply to comment #2) > Hi Yury, please review this patch.
anthony taranto
Comment 5 2011-02-22 12:04:55 PST
anthony taranto
Comment 6 2011-02-22 12:06:50 PST
Generated a patch with webkit-patch upload and included a ChangeLog. Let me know if anything else is needed.
Marshall Greenblatt
Comment 7 2011-02-25 12:16:56 PST
Can someone add this patch to the commit queue? Thanks.
Yury Semikhatsky
Comment 8 2011-03-01 01:00:11 PST
Comment on attachment 83357 [details] Patch Clearing flags on attachment: 83357 Committed r79981: <http://trac.webkit.org/changeset/79981>
Yury Semikhatsky
Comment 9 2011-03-01 01:00:18 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.