Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/src/api-arguments.cc b/src/api-arguments.cc
new file mode 100644
index 0000000..c4b698c
--- /dev/null
+++ b/src/api-arguments.cc
@@ -0,0 +1,31 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/api-arguments.h"
+
+namespace v8 {
+namespace internal {
+
+Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
+ Isolate* isolate = this->isolate();
+ VMState<EXTERNAL> state(isolate);
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
+ FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_,
+ is_construct_call_);
+ f(info);
+ return GetReturnValue<Object>(isolate);
+}
+
+Handle<JSObject> PropertyCallbackArguments::Call(
+ IndexedPropertyEnumeratorCallback f) {
+ Isolate* isolate = this->isolate();
+ VMState<EXTERNAL> state(isolate);
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
+ PropertyCallbackInfo<v8::Array> info(begin());
+ f(info);
+ return GetReturnValue<JSObject>(isolate);
+}
+
+} // namespace internal
+} // namespace v8