Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 4c0195e03402
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: 3c5ea410ca56
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Oct 28, 2013

  1. vm: Copy missing properties from context

    This addresses a current shortcoming of the V8 SetNamedPropertyHandler
    function.
    
    It does not provide a way to intercept Object.defineProperty(..) calls.
    As a result, these properties are not copied onto the contextified
    sandbox when a new global property is added via either a function
    declaration or a Object.defineProperty(global, ...) call.
    
    Note that any function declarations or Object.defineProperty() globals
    that are created asynchronously (in a setTimeout, callback, etc.) will
    happen AFTER the call to copy properties, and thus not be caught.
    
    The way to properly fix this is to add some sort of a
    Object::SetNamedDefinePropertyHandler() function that takes a callback,
    which receives the property name and property descriptor as arguments.
    
    Luckily, such situations are rare, and asynchronously-added globals
    weren't supported by Node's VM module until 0.12 anyway.  But, this
    should be fixed properly in V8, and this copy function should be removed
    once there is a better way.
    
    Fix #6416
    isaacs committed Oct 28, 2013
    Copy the full SHA
    3c5ea41 View commit details
    Browse the repository at this point in the history