RESOLVED FIXED 165055
Fix exception scope verification failures in miscellaneous files.
https://bugs.webkit.org/show_bug.cgi?id=165055
Summary Fix exception scope verification failures in miscellaneous files.
Mark Lam
Reported 2016-11-23 22:27:02 PST
Patch coming.
Attachments
proposed patch. (11.93 KB, patch)
2016-11-23 22:30 PST, Mark Lam
no flags
proposed patch. (11.93 KB, patch)
2016-11-23 22:33 PST, Mark Lam
mark.lam: review-
proposed patch. (9.28 KB, patch)
2016-11-25 14:15 PST, Mark Lam
saam: review+
Mark Lam
Comment 1 2016-11-23 22:30:59 PST
Created attachment 295393 [details] proposed patch.
Mark Lam
Comment 2 2016-11-23 22:33:10 PST
Created attachment 295394 [details] proposed patch.
Mark Lam
Comment 3 2016-11-24 13:37:45 PST
Comment on attachment 295394 [details] proposed patch. It is invalid to replace returning encodedJSValue() with returning { }. On 32-bit builds, the former is non-zero, while the latter is 0. Will fix this patch.
Mark Lam
Comment 4 2016-11-25 14:15:05 PST
Created attachment 295430 [details] proposed patch.
Saam Barati
Comment 5 2016-11-28 13:53:35 PST
Comment on attachment 295430 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=295430&action=review > Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp:148 > + if (!moduleRecord) { > + scope.release(); Why not just move the DECLARE_THROW_SCOPE lower?
Mark Lam
Comment 6 2016-11-28 14:19:00 PST
Comment on attachment 295430 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=295430&action=review >> Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp:148 >> + scope.release(); > > Why not just move the DECLARE_THROW_SCOPE lower? Because the rule of thumb is to DECLARE_THROW_SCOPE (or DECLARE_CATCH_SCOPE) as high up in the function as much as possible. Keeping it consistent this way removes the chance of missing needed exception checks because someone declared it too late, and a function call that can throw is added subsequently before the declaration of the throw scope.
Mark Lam
Comment 7 2016-11-28 14:22:26 PST
Thanks for the review. Landed in r209018: <http://trac.webkit.org/r209018>.
Note You need to log in before you can comment on or make changes to this bug.