A String value for a switch statement may be an unresolved rope and could throw an exception during resolution. Switch statement processing needs to handle the exception.
<rdar://problem/52669115>
Created attachment 373560 [details] Patch
Comment on attachment 373560 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373560&action=review r=me with throwScope declaration fix. > Source/JavaScriptCore/dfg/DFGOperations.cpp:2478 > nit: can you remove this empty line? > Source/JavaScriptCore/jit/JITOperations.cpp:2320 > + auto throwScope = DECLARE_THROW_SCOPE(vm); You should declare this at the top of the function at the earliest possible location. This is the recommended best practice unless there's a really good reason not to.
(In reply to Mark Lam from comment #3) > Comment on attachment 373560 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=373560&action=review > > r=me with throwScope declaration fix. > > > Source/JavaScriptCore/dfg/DFGOperations.cpp:2478 > > > > nit: can you remove this empty line? > > > Source/JavaScriptCore/jit/JITOperations.cpp:2320 > > + auto throwScope = DECLARE_THROW_SCOPE(vm); > > You should declare this at the top of the function at the earliest possible > location. This is the recommended best practice unless there's a really > good reason not to. I made these changes.
Committed r247194: <https://trac.webkit.org/changeset/247194>