Index: Source/bindings/tests/results/V8TestObject.h |
diff --git a/Source/bindings/tests/results/V8TestObject.h b/Source/bindings/tests/results/V8TestObject.h |
index 2180bc5af51b92d5df33d1d9a1a108592c1da419..97c472e0edcb8403b8c5b78fd6393e65f0698700 100644 |
--- a/Source/bindings/tests/results/V8TestObject.h |
+++ b/Source/bindings/tests/results/V8TestObject.h |
@@ -89,6 +89,21 @@ inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation |
return wrap(impl, creationContext, isolate); |
} |
+inline UnsafePersistent<v8::Object> toV8Persistent(TestObj* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+{ |
+ ASSERT(impl); |
+ |
+ UnsafePersistent<v8::Object> wrapperPersistent = DOMDataStore::getWrapperPersistent<V8TestObject>(impl, isolate); |
+ if (LIKELY(!wrapperPersistent.isEmpty())) |
+ return wrapperPersistent; |
+ |
+ wrap(impl, creationContext, isolate); |
+ |
+ wrapperPersistent = DOMDataStore::getWrapperPersistent<V8TestObject>(impl, isolate); |
+ ASSERT(!wrapperPersistent.isEmpty()); |
+ return wrapperPersistent; |
+} |
+ |
template<typename CallbackInfo> |
inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObj* impl, v8::Handle<v8::Object> creationContext) |
{ |