Fixes for v8 3.21.17 (0x032117)
This commit is contained in:
parent
3d63f9113b
commit
e98a659246
6 changed files with 190 additions and 25 deletions
|
|
@ -9,7 +9,12 @@
|
|||
|
||||
%fragment("js_ctor", "templates") %{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Object> self = args.Holder();
|
||||
$jslocals
|
||||
if(args.Length() != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
|
|
@ -32,7 +37,12 @@ fail:
|
|||
%fragment ("js_veto_ctor", "templates")
|
||||
%{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
SWIG_exception(SWIG_ERROR, "Class $jsname can not be instantiated");
|
||||
SWIGV8_RETURN(v8::Undefined());
|
||||
}
|
||||
|
|
@ -47,7 +57,12 @@ SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
|||
%fragment ("js_ctor_dispatcher", "templates")
|
||||
%{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
OverloadErrorHandler errorHandler;
|
||||
v8::Handle<v8::Value> self;
|
||||
|
||||
|
|
@ -72,7 +87,12 @@ fail:
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment("js_overloaded_ctor", "templates") %{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args, V8ErrorHandler& SWIGV8_ErrorHandler) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Object> self = args.Holder();
|
||||
$jslocals
|
||||
if(args.Length() != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
|
|
@ -201,7 +221,12 @@ void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object > * object, SWI
|
|||
%fragment("js_getter", "templates")
|
||||
%{
|
||||
SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo& info) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
$jslocals
|
||||
$jscode
|
||||
|
|
@ -223,7 +248,12 @@ fail:
|
|||
%{
|
||||
void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
|
||||
const SwigV8PropertyCallbackInfoVoid& info) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
$jslocals
|
||||
$jscode
|
||||
goto fail;
|
||||
|
|
@ -241,7 +271,12 @@ fail:
|
|||
%fragment("js_function", "templates")
|
||||
%{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
$jslocals
|
||||
if(args.Length() != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
|
|
@ -265,7 +300,12 @@ fail:
|
|||
%fragment("js_function_dispatcher", "templates")
|
||||
%{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
OverloadErrorHandler errorHandler;
|
||||
$jscode
|
||||
|
|
@ -288,7 +328,12 @@ fail:
|
|||
%{
|
||||
SwigV8ReturnValue $jswrapper(const SwigV8Arguments& args, V8ErrorHandler& SWIGV8_ErrorHandler)
|
||||
{
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
$jslocals
|
||||
$jscode
|
||||
|
|
|
|||
|
|
@ -15,7 +15,12 @@
|
|||
SWIGINTERNINLINE v8::Handle<v8::Value>
|
||||
SWIG_From_dec(Type)(%ifcplusplus(const Type&, Type) c)
|
||||
{
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Local<v8::Array> vals = v8::Array::New(2);
|
||||
|
||||
vals->Set(0, SWIG_From(double)(Real(c)));
|
||||
|
|
@ -33,7 +38,11 @@ SWIG_From_dec(Type)(%ifcplusplus(const Type&, Type) c)
|
|||
SWIGINTERN int
|
||||
SWIG_AsVal_dec(Type) (v8::Handle<v8::Value> o, Type* val)
|
||||
{
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
if (o->IsArray()) {
|
||||
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(o);
|
||||
|
|
@ -75,7 +84,11 @@ SWIG_AsVal_dec(Type) (v8::Handle<v8::Value> o, Type* val)
|
|||
SWIGINTERN int
|
||||
SWIG_AsVal_dec(Type) (v8::Handle<v8::Value> o, Type* val)
|
||||
{
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
if (o->IsArray()) {
|
||||
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(o);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
|
|||
* Creates a class template for a class with specified initialization function.
|
||||
*/
|
||||
SWIGRUNTIME v8::Handle<v8::FunctionTemplate> SWIGV8_CreateClassTemplate(const char* symbol) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Local<v8::FunctionTemplate> class_templ = v8::FunctionTemplate::New();
|
||||
class_templ->SetClassName(v8::String::NewSymbol(symbol));
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,12 @@ void SWIGV8_INIT (v8::Handle<v8::Object> exports, v8::Handle<v8::Object> /*modul
|
|||
{
|
||||
SWIG_InitializeModule(static_cast<void *>(&exports));
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Object> exports_obj = exports;
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,11 @@ public:
|
|||
v8::Persistent<v8::FunctionTemplate> SWIGV8_SWIGTYPE_Proxy_class_templ;
|
||||
|
||||
int SWIG_V8_ConvertInstancePtr(v8::Handle<v8::Object> objRef, void** ptr, swig_type_info *info, int flags) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
if(objRef->InternalFieldCount() < 1) return SWIG_ERROR;
|
||||
|
||||
|
|
@ -239,7 +243,12 @@ void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void* ptr, swig_type_info
|
|||
}
|
||||
|
||||
int SWIG_V8_ConvertPtr(v8::Handle<v8::Value> valRef, void** ptr, swig_type_info *info, int flags) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
/* special case: JavaScript null => C NULL pointer */
|
||||
if(valRef->IsNull()) {
|
||||
*ptr=0;
|
||||
|
|
@ -253,7 +262,12 @@ int SWIG_V8_ConvertPtr(v8::Handle<v8::Value> valRef, void** ptr, swig_type_info
|
|||
}
|
||||
|
||||
v8::Handle<v8::Value> SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::FunctionTemplate> class_templ;
|
||||
|
||||
if (ptr == NULL) {
|
||||
|
|
@ -293,12 +307,14 @@ v8::Handle<v8::Value> SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int
|
|||
|
||||
#define SWIG_GetInstancePtr(obj, ptr) SWIG_V8_GetInstancePtr(obj, ptr)
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x031903)
|
||||
v8::Handle<v8::Value> _SWIGV8_wrap_equals(const v8::Arguments &args) {
|
||||
#else
|
||||
void _SWIGV8_wrap_equals(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
#endif
|
||||
SwigV8ReturnValue _SWIGV8_wrap_equals(const SwigV8Arguments &args) {
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
void *arg1 = (void *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
|
|
@ -326,12 +342,14 @@ fail:
|
|||
SWIGV8_RETURN(v8::Undefined());
|
||||
}
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x031903)
|
||||
v8::Handle<v8::Value> _wrap_getCPtr(const v8::Arguments &args) {
|
||||
#else
|
||||
void _wrap_getCPtr(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
#endif
|
||||
SwigV8ReturnValue _wrap_getCPtr(const SwigV8Arguments &args) {
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Value> jsresult;
|
||||
void *arg1 = (void *) 0 ;
|
||||
long result;
|
||||
|
|
@ -372,7 +390,13 @@ public:
|
|||
|
||||
SWIGRUNTIMEINLINE
|
||||
int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
v8::Handle<v8::Object> objRef = valRef->ToObject();
|
||||
if(objRef->InternalFieldCount() < 1) return false;
|
||||
v8::Handle<v8::Value> flag = objRef->GetHiddenValue(v8::String::New("__swig__packed_data__"));
|
||||
|
|
@ -382,7 +406,13 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
|
|||
SWIGRUNTIME
|
||||
swig_type_info* SwigV8Packed_UnpackData(v8::Handle<v8::Value> valRef, void *ptr, size_t size) {
|
||||
if (SwigV8Packed_Check(valRef)) {
|
||||
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
SwigV8PackedData *sobj;
|
||||
|
||||
v8::Handle<v8::Object> objRef = valRef->ToObject();
|
||||
|
|
@ -445,7 +475,11 @@ void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent< v8::Obj
|
|||
|
||||
SWIGRUNTIME
|
||||
v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_info *type) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
SwigV8PackedData* cdata = new SwigV8PackedData(data, size, type);
|
||||
v8::Handle<v8::Object> obj = v8::Object::New();
|
||||
|
|
@ -497,7 +531,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
|
|||
|
||||
SWIGRUNTIME
|
||||
v8::Handle<v8::Value> SWIGV8_AppendOutput(v8::Handle<v8::Value> result, v8::Handle<v8::Value> obj) {
|
||||
#if (SWIG_V8_VERSION < 0x032117)
|
||||
v8::HandleScope scope;
|
||||
#else
|
||||
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||
#endif
|
||||
|
||||
if (result->IsUndefined()) {
|
||||
result = v8::Array::New();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue