Skip to content

Commit

Permalink
fixed deprecation warnings for v8-3.21
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Sep 5, 2013
1 parent 740da9c commit b49da78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Lib/javascript/v8/javascriptcode.swg
Expand Up @@ -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
}
%}
Expand Down Expand Up @@ -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
}
%}
Expand Down
10 changes: 8 additions & 2 deletions Lib/javascript/v8/javascriptruntime.swg
Expand Up @@ -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
Expand Down Expand Up @@ -238,7 +238,13 @@ void SWIGV8_SetPrivateData(v8::Handle<v8::Object> 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
}

Expand Down

0 comments on commit b49da78

Please sign in to comment.