Bug 247380 - Check for execution context between different phases of event listeners
Summary: Check for execution context between different phases of event listeners
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chirag M Shah
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-02 14:18 PDT by Chirag M Shah
Modified: 2022-11-07 06:44 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chirag M Shah 2022-11-02 14:18:16 PDT
Event listeners can move a frame, which invalidates the current script execution context between phases. 

Basically, we should be checking for script execution context between:

fireEventListeners(event, EventInvokePhase::Capturing);
and
fireEventListeners(event, EventInvokePhase::Bubbling);

in EventTarget.cpp
Comment 1 Chirag M Shah 2022-11-04 10:54:01 PDT
Pull request: https://github.com/chirags27/WebKit/pull/3
Comment 2 Chirag M Shah 2022-11-04 10:57:04 PDT
Pull request: https://github.com/WebKit/WebKit/pull/6141
Comment 3 Chirag M Shah 2022-11-04 16:55:57 PDT
rdar://101744963
Comment 4 EWS 2022-11-07 06:44:13 PST
Committed 256402@main (1624156ba5f9): <https://commits.webkit.org/256402@main>

Reviewed commits have been landed. Closing PR #6141 and removing active labels.