Skip to content

Procedures named with Object prototype attr names cause crash upon executing #2577

Open
@apple502j

Description

@apple502j

Expected Behavior

Scratch should not crash, especially in the thread (because it does not show the blue screen and consume memory by spamming browser console)

Actual Behavior

It crashes

Steps to Reproduce

Make a procedure named "hasOwnProperty" or something else in the object prototype.

Operating System and Browser

any

Fixes

Procedure related cache attributes need to use prototypeless object or Map.

This is different from #2332 because modifying json is not necessary for this to happen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions