-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
A-content/bindingsThe DOM bindingsThe DOM bindingsA-content/scriptRelated to the script threadRelated to the script threadE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-safetySome piece of code violates memory safety guarantees.Some piece of code violates memory safety guarantees.
Description
@pcwalton @Manishearth @asajeffrey I recall discussing this topic in Berlin, but I can't find the notes I thought I took. Attempting to reconstruct from memory:
- there exist DOM objects that have Drop impls for various reasons
- there was agreement that it should be possible to run some code in response to a GC finalizer (eg. webgl objects need to be able to unreference their graphics resources)
- the easiest way to ban Drop impls is to make the
#[dom_struct]macro also add an empty Drop impl, which will conflict with any manual implementation - for any code which does require a valid Drop, we can create inner structs that only hold the data required for that implementation and nothing more
Does this make sense? My memory is haziest when it comes to the last point.
Metadata
Metadata
Assignees
Labels
A-content/bindingsThe DOM bindingsThe DOM bindingsA-content/scriptRelated to the script threadRelated to the script threadE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-safetySome piece of code violates memory safety guarantees.Some piece of code violates memory safety guarantees.