2009-11-10 Vitaly Repeshko <vitalyr@chromium.org>
[WebKit-https.git] / WebCore / bindings / v8 / custom / V8CustomXPathNSResolver.h
index f1dc65c70ff524d1f7a98845a2e58b2310294d6f..15ac27d09a5b389dcc3c3d2ff78171ebe28387ff 100644 (file)
 namespace WebCore {
 
 class String;
+class V8Proxy;
 
+// V8CustomXPathNSResolver does not create a persistent handle to the
+// given resolver object.  So the lifetime of V8CustomXPathNSResolver
+// must not exceed the lifetime of the passed handle.
 class V8CustomXPathNSResolver : public XPathNSResolver {
 public:
-    static PassRefPtr<V8CustomXPathNSResolver> create(v8::Handle<v8::Object> resolver);
+    static PassRefPtr<V8CustomXPathNSResolver> create(V8Proxy* proxy, v8::Handle<v8::Object> resolver);
 
     virtual ~V8CustomXPathNSResolver();
     virtual String lookupNamespaceURI(const String& prefix);
 
 private:
-    V8CustomXPathNSResolver(v8::Handle<v8::Object> resolver);
+    V8CustomXPathNSResolver(V8Proxy* proxy, v8::Handle<v8::Object> resolver);
 
+    V8Proxy* m_proxy;
     v8::Handle<v8::Object> m_resolver;  // Handle to resolver object.
 };