diff options
Diffstat (limited to 'WebCore/storage/IDBAny.h')
-rw-r--r-- | WebCore/storage/IDBAny.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/WebCore/storage/IDBAny.h b/WebCore/storage/IDBAny.h index 950660a..9066e13 100644 --- a/WebCore/storage/IDBAny.h +++ b/WebCore/storage/IDBAny.h @@ -44,11 +44,19 @@ class SerializedScriptValue; class IDBAny : public RefCounted<IDBAny> { public: - static PassRefPtr<IDBAny> create(); + static PassRefPtr<IDBAny> createInvalid(); + static PassRefPtr<IDBAny> createNull(); template<typename T> static PassRefPtr<IDBAny> create(T* idbObject) { - RefPtr<IDBAny> any = IDBAny::create(); + RefPtr<IDBAny> any = IDBAny::createInvalid(); + any->set(idbObject); + return any.release(); + } + template<typename T> + static PassRefPtr<IDBAny> create(PassRefPtr<T> idbObject) + { + RefPtr<IDBAny> any = IDBAny::createInvalid(); any->set(idbObject); return any.release(); } @@ -77,7 +85,7 @@ public: PassRefPtr<SerializedScriptValue> serializedScriptValue(); // Set can only be called once. - void set(); // For "null". + void setNull(); void set(PassRefPtr<IDBCursor>); void set(PassRefPtr<IDBDatabase>); void set(PassRefPtr<IDBFactory>); |