1. Jul 13, 2017
    • Gabriel Schulhof's avatar
      n-api: Implement stricter wrapping · d5b397c9
      Gabriel Schulhof authored
      Use a stronger criterion to identify objects in the prototype chain that store
      pointers to native data that were added by previous calls to `napi_wrap()`.
      
      Whereas the old criterion for identifying `napi_wrap()`-injected prototype
      chain objects was to consider an object with an internal field
      count of 1 to be such an object, the new criterion is to consider an object
      with an internal field count of 2 such that the second field holds a
      `v8::External` which itself contains a pointer to a global static string unique
      to N-API to be a `napi_wrap()`-injected prototype chain object.
      
      This greatly reduces the possibility of returning a pointer that was not
      previously added with `napi_wrap()`, and it allows us to recognize that an
      object has already undergone `napi_wrap()` and we can thus prevent a chain of
      wrappers only the first of which is accessible from appearing in the prototype
      chain, as would be the result of multiple calls to `napi_wrap()` using the same
      object.
      
      PR-URL: https://github.com/nodejs/node/pull/13872
      
      
      Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
      Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
      Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
      d5b397c9
  2. Jul 12, 2017
  3. Jul 11, 2017
  4. Jul 10, 2017
  5. Jul 09, 2017
  6. Jul 08, 2017
  7. Jul 07, 2017