Summary: | Fix exception scope verification failures in miscellaneous files. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, fpizlo, ggaren, jfbastien, keith_miller, msaboff, saam, ysuzuki | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Local Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 162351 | ||||||||||
Attachments: |
|
Description
Mark Lam
2016-11-23 22:27:02 PST
Created attachment 295393 [details]
proposed patch.
Created attachment 295394 [details]
proposed patch.
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.
Created attachment 295430 [details]
proposed patch.
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? 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. Thanks for the review. Landed in r209018: <http://trac.webkit.org/r209018>. |