Skip to content

Can't use JS_GC_ZEAL due to global construction ordering #6057

Closed

Description

@jdm

WindowBinding::Wrap calls create_dom_global, then JS_SetReservedSlot on the resulting object to store the native pointer. Unfortunately, create_dom_global calls JS_NewGlobalObject, followed by JS_InitStandardClasses, then initialize_global, which end up all doing a lot of allocation. This makes GC_ZEAL useless, since the trace method requires obtaining the native pointer which fails before the JS_SetReservedSlot call.

Activity

  1. added
    A-content/bindings
    I-safety
    on May 15, 2015
  2. added 3 commits that reference this issue on Oct 27, 2015
    5f72326
    73b3409
    c82b6ce
  3. added 2 commits that reference this issue on Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/bindingsI-safety

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions