Summary: | Assert that NoEventDispatchAssertion is not in the stack when executing a script | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | UI Events | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | buildbot, fpizlo, ggaren, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2017-11-01 00:36:21 PDT
Created attachment 325554 [details]
Adds assertion
Once this patch is landed, we can make NoEventDispatchAssertion cheap enough for the main thread to release-assert. Attachment 325554 [details] did not pass style-queue:
ERROR: Source/WebCore/bindings/js/ScriptController.cpp:681: Please replace ASSERT_WITH_SECURITY_IMPLICATION() with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(). [security/assertion] [5]
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 325554 [details] Adds assertion View in context: https://bugs.webkit.org/attachment.cgi?id=325554&action=review > Source/WebCore/bindings/js/ScriptController.cpp:681 > + ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::isEventAllowedInMainThread()); Please add a blank line after this. (In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 325554 [details] > Adds assertion > > View in context: > https://bugs.webkit.org/attachment.cgi?id=325554&action=review > > > Source/WebCore/bindings/js/ScriptController.cpp:681 > > + ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::isEventAllowedInMainThread()); > > Please add a blank line after this. Done that. Talked with Keith (Miller) and Saam to confirm that creating event listener wouldn't run arbitrary scripts to be sure. Committed r224290: <https://trac.webkit.org/changeset/224290> |