title: How to apply callback with v8::Arguments?
body: <p>I'm writing a Node.js native module with a function accepting arbitrary length arguments, and it's similar with this in JS:</p>
  
  <pre class="lang-js prettyprint-override"><code>cb  = function( )
  {
    // Receive arguments and do something...
  }
  
  foo = function( )
  {
    cb.apply({}, arguments)
  }
  
  foo([1,2,3])
  foo([4])
  </code></pre>
  
  <p>Here, <code>foo</code> apply the <code>cb</code> with arbitrary arguments.</p>
  
  <p>And the C++ version, according to most Node.js articles about callbacks, would like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>Handle&lt;Value&gt; Foo(const Arguments&amp; args) 
  {
    HandleScope scope;
  
    // Assume that we can get callback from somewhere else.
    Local&lt;Function&gt; cb = getExistingCallback();  
  
    // Now call it with arbitrary arguments.
    cb-&gt;Call(Object::New(), args.Length(), args.Data());
  
    return scope.Close(Undefined());
  }
  </code></pre>
  
  <p>But <code>Arguments::Data</code> can only provide <code>v8::Local&lt;v8::Value&gt;&amp;</code>, 
  not <code>v8::Handle&lt;v8::Value&gt;*</code>, so compiler will throw errors. </p>
  
  <p>Because <code>Local</code> derived from <code>Handle</code>, it's not the problem. I just don't if there is any solution I can use to avoid copy all member from the <code>Data</code> to a new array then pass it in. </p>