RESOLVED FIXED108640
Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
https://bugs.webkit.org/show_bug.cgi?id=108640
Summary Web Inspector: [Extension API] adjust inspectedWindow.eval() callback paramet...
Andrey Kosyakov
Reported 2013-02-01 08:21:50 PST
Currently, we do not differentiate between JavaScript exceptions in the code being executed and other sorts of errors (e.g. inspector protocol or arguments validation). Also, the exception information is returned in the same argument that is used to return result in case expression was successfully evaluated. This may lead to bugs if value argument is ignored. The proposed change will only set first argument to the callback iff the expression is successfully evaluated. The second argument will be undefined in case of succecss. In case of exception, the second argument will be { isException: true, value: <stringified value of exception> } In case of protocol error or extension server, the second argument will be { isError: true } with the rest of fields set as normally for errors.
Attachments
Patch (9.83 KB, patch)
2013-02-01 08:26 PST, Andrey Kosyakov
vsevik: review+
buildbot: commit-queue-
Andrey Kosyakov
Comment 1 2013-02-01 08:26:43 PST
Vsevolod Vlasov
Comment 2 2013-02-01 08:58:44 PST
Comment on attachment 186053 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186053&action=review > Source/WebCore/ChangeLog:11 > + - minor drive-by changes in ExtensionAPI utilities. I would revert this because it's less readable.
Build Bot
Comment 3 2013-02-01 09:55:42 PST
Comment on attachment 186053 [details] Patch Attachment 186053 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16297883 New failing tests: inspector/extensions/extensions-eval.html inspector/extensions/extensions-sidebar.html
Build Bot
Comment 4 2013-02-01 10:53:34 PST
Comment on attachment 186053 [details] Patch Attachment 186053 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16296856 New failing tests: inspector/extensions/extensions-eval.html inspector/extensions/extensions-events.html inspector/extensions/extensions-sidebar.html
Andrey Kosyakov
Comment 5 2013-02-11 10:07:20 PST
Note You need to log in before you can comment on or make changes to this bug.