summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinícius dos Santos Oliveira <vini.ipsmaker@expertisesolutions.com.br>2015-06-03 19:02:32 -0300
committerVinícius dos Santos Oliveira <vini.ipsmaker@expertisesolutions.com.br>2015-06-03 19:02:32 -0300
commitab5a140691d05d36dc45064ccbfd6df2242b1605 (patch)
tree35b0b84be4f183259929b99523f5339cf047cff7
parent5de5e8f9f8017d734358b0b65cf5a4ab2a6c8e01 (diff)
Revert "[eina_js] add: now compatibility_persistent will store v8::Isolate"
This reverts commit 77ffb055a15aee55ba2a84e890955433ce697cb2.
-rw-r--r--src/bindings/eina_js/eina_js_compatibility.hh16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/bindings/eina_js/eina_js_compatibility.hh b/src/bindings/eina_js/eina_js_compatibility.hh
index 7e8792c..72d054d 100644
--- a/src/bindings/eina_js/eina_js_compatibility.hh
+++ b/src/bindings/eina_js/eina_js_compatibility.hh
@@ -337,7 +337,6 @@ struct compatibility_persistent<T, true> : v8::UniquePersistent<T>
337 compatibility_persistent() {} 337 compatibility_persistent() {}
338 compatibility_persistent(v8::Isolate* isolate, v8::Handle<T> v) 338 compatibility_persistent(v8::Isolate* isolate, v8::Handle<T> v)
339 : _base(isolate, v) 339 : _base(isolate, v)
340 , isolate(isolate)
341 { 340 {
342 } 341 }
343 342
@@ -346,12 +345,7 @@ struct compatibility_persistent<T, true> : v8::UniquePersistent<T>
346 return *handle(); 345 return *handle();
347 } 346 }
348 347
349 v8::Handle<T> handle() const { return v8::Local<T>::New(isolate, *this); } 348 v8::Handle<T> handle() const { return v8::Local<T>::New(v8::Isolate::GetCurrent(), *this); }
350
351 v8::Isolate* GetIsolate() { return isolate; }
352
353private:
354 v8::Isolate *isolate;
355}; 349};
356 350
357template <typename T> 351template <typename T>
@@ -360,19 +354,13 @@ struct compatibility_persistent<T, false> : v8::Persistent<T>
360 typedef v8::Persistent<T> _base; 354 typedef v8::Persistent<T> _base;
361 355
362 compatibility_persistent() {} 356 compatibility_persistent() {}
363 compatibility_persistent(v8::Isolate *isolate, v8::Handle<T> v) 357 compatibility_persistent(v8::Isolate*, v8::Handle<T> v)
364 : _base(v) 358 : _base(v)
365 , isolate(isolate)
366 { 359 {
367 } 360 }
368 361
369 v8::Handle<T>& handle() { return *this; } 362 v8::Handle<T>& handle() { return *this; }
370 v8::Handle<T> const& handle() const { return *this; } 363 v8::Handle<T> const& handle() const { return *this; }
371
372 v8::Isolate* GetIsolate() { return isolate; }
373
374private:
375 v8::Isolate *isolate;
376}; 364};
377 365
378template <typename T = std::integral_constant<bool, v8_uses_isolate> > 366template <typename T = std::integral_constant<bool, v8_uses_isolate> >