Closed Bug 1686716 Opened 5 years ago Closed 5 years ago

Calling event.preventDefault in drop event handler causes a crash after target iframe has been removed

Categories

(Core :: DOM: Events, defect)

Firefox 84
defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: kimmotur, Assigned: smaug)

Details

Attachments

(2 files)

Attached file test.html

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

Steps to reproduce:

I have a page containing an iframe, which will be replaced with other content after a drop event is received in it. When event.preventDefault is called in the drop event handler after the content has been replaced the browser tab will crash.

Minimal reproduction case is attached in test.html

Actual results:

The browser tab crashes.

Expected results:

The drop event handler should run without crashing.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → DOM: Drag & Drop
Assignee: nobody → bugs
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: DOM: Drag & Drop → DOM: Events

Outerwindow implements nsIScriptObjectPrincipal.

I need to write still a testcase for this

Severity: -- → S3
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3636a62369e Calling event.preventDefault in drop event handler causes a crash after target iframe has been removed, r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: