Summary: | Add some needed CatchScopes in code that should not throw. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, commit-queue, fpizlo, ggaren, jfbastien, keith_miller, msaboff, ryanhaddad, saam | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Local Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | 162588 | ||||||||
Bug Blocks: | 162351 | ||||||||
Attachments: |
|
Description
Mark Lam
2016-09-26 16:39:05 PDT
Created attachment 289893 [details]
proposed patch.
Comment on attachment 289893 [details]
proposed patch.
r=me.
Thanks for the review. I fixed a typo in the ChangeLog before landing. Landed in r206405: <http://trac.webkit.org/r206405>. Comment on attachment 289893 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=289893&action=review > Source/JavaScriptCore/jsc.cpp:2549 > + RETURN_IF_EXCEPTION(scope, 3); How can GlobalObject::create throw? This change appears to have caused two LayoutTests to crash (EWS seems to have caught this, but the patch was landed before results could be verified). plugins/npruntime/object-from-destroyed-plugin.html plugins/npruntime/object-from-destroyed-plugin-in-subframe.html https://build.webkit.org/results/Apple%20El%20Capitan%20Release%20WK2%20(Tests)/r206406%20(9738)/results.html Re-opened since this is blocked by bug 162588 Comment on attachment 289893 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=289893&action=review >> Source/JavaScriptCore/jsc.cpp:2549 >> + RETURN_IF_EXCEPTION(scope, 3); > > How can GlobalObject::create throw? I forgot the details of what motivated this change in the first place. I'll leave it out for now until the motivation arises again when I turn on exception check verification. > Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:246 > + VM& vm = exec->vm(); > + auto scope = DECLARE_CATCH_SCOPE(vm); > + > String errorMessage = makeString(errorDescriptionForValue(exec, value)->value(exec), ' ', message); > + if (UNLIKELY(scope.exception())) { > + scope.clearException(); > + errorMessage = message; > + } This change appears to need additional support from exception checks that are missing. I will leave it out for now until I have the missing exception checks in place. Created attachment 289989 [details]
Patch for re-landing.
Tests are happy. Revised patch landed in r206459: <http://trac.webkit.org/r206459>. |