| Summary: | Defer TerminationExceptions when evaluating ASSERT in HashMapIml::addNormalized(). | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | ews-watchlist, keith_miller, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Mark Lam
2021-04-14 11:31:40 PDT
Created attachment 426026 [details]
proposed patch.
Comment on attachment 426026 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=426026&action=review > Source/JavaScriptCore/runtime/ExceptionHelpers.h:72 > +#define DEFER_TERMINATION_AND_ASSERT(vm, assertion, ...) do { \ > + JSC::DeferTerminationForAWhile deferScope(vm); \ > + ASSERT(assertion, __VA_ARGS__); \ > + } while (false) > + > +#define DEFER_TERMINATION_AND_ASSERT_WITH_MESSAGE(vm, assertion, ...) do { \ > + JSC::DeferTerminationForAWhile deferScope(vm); \ > + ASSERT_WITH_MESSAGE(assertion, __VA_ARGS__); \ > + } while (false) Let's make them nop for Release builds. JSC::DeferTerminationForAWhile is calling deferTermination / undoDeferTermination functions. And I think addNormalized is really critical enough so that we should not insert these calls. Created attachment 426046 [details]
proposed patch.
Comment on attachment 426046 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=426046&action=review r=me > Source/JavaScriptCore/runtime/VMTraps.h:194 > + enum DeferAction { Let’s use enum class. Thanks for the review. I've made the enum class change. Landed in r275969: <http://trac.webkit.org/r275969>. |