aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-01-09 22:45:35 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-01-09 22:45:35 -0200
commit4ca7763f60d2fd47d097093397a1d0c7c41f30c3 (patch)
tree240d0d688e187b10233b204b3b5d9538eb17829e
parentFixes for compatibility (diff)
downloadefl-4ca7763f60d2fd47d097093397a1d0c7c41f30c3.tar.gz
Fixed string v8 NewFromUtf8 workaround and _v8_get_context
-rw-r--r--src/bindings/eina_js/eina_js_compatibility.hh36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/bindings/eina_js/eina_js_compatibility.hh b/src/bindings/eina_js/eina_js_compatibility.hh
index 8b48c2fbc5..d8f0403524 100644
--- a/src/bindings/eina_js/eina_js_compatibility.hh
+++ b/src/bindings/eina_js/eina_js_compatibility.hh
@@ -135,38 +135,6 @@ struct compatibility_string<false> : v8::String
{
};
-template <typename...Args>
-auto compatibility_new_impl(v8::Isolate* isolate, std::true_type, compatibility_type_tag<v8::String>
- , Args...args) ->
- decltype(compatibility_string<>::NewFromUtf8(isolate, args...))
-{
- return compatibility_string<>::NewFromUtf8(isolate, args...);
-}
-
-template <typename...Args>
-auto compatibility_new_impl(v8::Isolate* isolate, std::false_type, compatibility_type_tag<v8::String>
- , Args...args) ->
- decltype(compatibility_string<>::NewFromUtf8(isolate, args...))
-{
- return compatibility_string<>::NewFromUtf8(isolate, args...);
-}
-
-template <typename...Args>
-auto compatibility_new_impl(nullptr_t, std::true_type, compatibility_type_tag<v8::String>
- , Args...args) ->
- decltype(compatibility_string<>::NewFromUtf8(v8::Isolate::GetCurrent(), args...))
-{
- return compatibility_string<>::NewFromUtf8(v8::Isolate::GetCurrent(), args...);
-}
-
-template <typename...Args>
-auto compatibility_new_impl(nullptr_t, std::false_type, compatibility_type_tag<v8::String>
- , Args...args) ->
- decltype(compatibility_string<>::NewFromUtf8(v8::Isolate::GetCurrent(), args...))
-{
- return compatibility_string<>::NewFromUtf8(v8::Isolate::GetCurrent(), args...);
-}
-
template <typename T, typename...Args>
auto compatibility_new_impl(v8::Isolate* isolate, std::true_type, compatibility_type_tag<T>
, Args...args) ->
@@ -469,7 +437,7 @@ v8::Local<T> compatibility_cast(U* v)
return *static_cast<v8::Local<T>*>(static_cast<void*>(v));
}
-template <typename T = v8::Context, bool = v8_uses_isolate>
+template <typename T = v8::Isolate, bool = v8_uses_isolate>
struct _v8_get_current_context;
template <typename T>
@@ -488,7 +456,7 @@ struct _v8_get_current_context<T, true> : T
inline v8::Local<v8::Object> compatibility_global()
{
- return v8::Isolate::GetCurrent()->GetCurrentContext()->Global();
+ return _v8_get_current_context<>::GetCurrent()->Global();
}
} } }