From b49da78b0a6ef1d6e9f624c60710f79e709fca2e Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Thu, 5 Sep 2013 19:50:15 +0400 Subject: [PATCH] fixed deprecation warnings for v8-3.21 --- Lib/javascript/v8/javascriptcode.swg | 8 ++++++-- Lib/javascript/v8/javascriptruntime.swg | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg index 4277e8b0c..ac322ab42 100644 --- a/Lib/javascript/v8/javascriptcode.swg +++ b/Lib/javascript/v8/javascriptcode.swg @@ -141,8 +141,10 @@ void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object > * object, SWI object.Clear(); #if (SWIG_V8_VERSION < 0x031900) object.Dispose(); -#else +#elif (SWIG_V8_VERSION < 0x032100) object->Dispose(isolate); +#else + object->Dispose(); #endif } %} @@ -171,8 +173,10 @@ void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object > * object, SWI #if (SWIG_V8_VERSION < 0x031900) object.Dispose(); -#else +#elif (SWIG_V8_VERSION < 0x032100) object->Dispose(isolate); +#else + object->Dispose(); #endif } %} diff --git a/Lib/javascript/v8/javascriptruntime.swg b/Lib/javascript/v8/javascriptruntime.swg index ab52aa815..31ce84a04 100644 --- a/Lib/javascript/v8/javascriptruntime.swg +++ b/Lib/javascript/v8/javascriptruntime.swg @@ -110,7 +110,7 @@ public: }; ~SWIGV8_Proxy() { -#if (SWIG_V8_VERSION < 0x031900) +#if (SWIG_V8_VERSION < 0x031900 || SWIG_V8_VERSION >= 0x032100) handle.ClearWeak(); handle.Dispose(); #else @@ -238,7 +238,13 @@ void SWIGV8_SetPrivateData(v8::Handle obj, void* ptr, swig_type_info } else { cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, SWIGV8_Proxy_DefaultDtor); } - cdata->handle.MarkIndependent(v8::Isolate::GetCurrent()); + +# if (SWIG_V8_VERSION < 0x032100) + cdata->handle.MarkIndependent(v8::Isolate::GetCurrent()); +# else + cdata->handle.MarkIndependent(); +# endif + #endif }