Skip to content

400 nested shadow roots crashes Servo #43845

@webbedspace

Description

@webbedspace

Describe the bug:
See example

To Reproduce:

<!doctype html>
<div id="X"></div>
<script>
    let p = X
    for (let i=0;i<400;i++) {
        let x = document.createElement('div')
        let r = x.attachShadow({
            mode:'open', clonable: true
        })
        p.appendChild(x)
        p = r
    }
    p.innerHTML = `Hello!`
</script>

Console reports this:

thread 'Script#1' (12532) has overflowed its stack

Firefox and Chrome:
Image

Platform:
Servo, Windows 10

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions