Make ScopedPersistent do type conversion.
This commit is contained in:
parent
94dec0ff85
commit
9cc90ac7d5
2 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "native_mate/wrappable.h"
|
||||||
#include "native_mate/function_template.h"
|
#include "native_mate/function_template.h"
|
||||||
|
|
||||||
namespace mate {
|
namespace mate {
|
||||||
|
|
|
@ -18,8 +18,8 @@ class ScopedPersistent {
|
||||||
ScopedPersistent() {
|
ScopedPersistent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit ScopedPersistent(v8::Handle<T> handle) {
|
explicit ScopedPersistent(v8::Handle<v8::Value> handle) {
|
||||||
reset(handle);
|
reset(v8::Handle<T>::Cast(handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
~ScopedPersistent() {
|
~ScopedPersistent() {
|
||||||
|
@ -93,7 +93,7 @@ class RefCountedPersistent : public ScopedPersistent<T>,
|
||||||
public:
|
public:
|
||||||
RefCountedPersistent() {}
|
RefCountedPersistent() {}
|
||||||
|
|
||||||
explicit RefCountedPersistent(v8::Handle<T> handle)
|
explicit RefCountedPersistent(v8::Handle<v8::Value> handle)
|
||||||
: ScopedPersistent<T>(handle) {
|
: ScopedPersistent<T>(handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue