class ExceptionState;
-class IDBKeyRange : public ScriptWrappable, public RefCounted<IDBKeyRange> {
+class IDBKeyRange : public RefCountedWillBeGarbageCollectedFinalized<IDBKeyRange>, public ScriptWrappable {
public:
enum LowerBoundType {
LowerBoundOpen,
UpperBoundClosed
};
- static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType)
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> create(PassRefPtrWillBeRawPtr<IDBKey> lower, PassRefPtrWillBeRawPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType)
{
- return adoptRef(new IDBKeyRange(lower, upper, lowerType, upperType));
+ return adoptRefWillBeNoop(new IDBKeyRange(lower, upper, lowerType, upperType));
}
// Null if the script value is null or undefined, the range if it is one, otherwise tries to convert to a key and throws if it fails.
- static PassRefPtr<IDBKeyRange> fromScriptValue(ExecutionContext*, const ScriptValue&, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> fromScriptValue(ExecutionContext*, const ScriptValue&, ExceptionState&);
~IDBKeyRange() { }
+ void trace(Visitor*);
// Implement the IDBKeyRange IDL
- PassRefPtr<IDBKey> lower() const { return m_lower; }
- PassRefPtr<IDBKey> upper() const { return m_upper; }
+ IDBKey* lower() const { return m_lower.get(); }
+ IDBKey* upper() const { return m_upper.get(); }
- ScriptValue lowerValue(ExecutionContext*) const;
- ScriptValue upperValue(ExecutionContext*) const;
+ ScriptValue lowerValue(ScriptState*) const;
+ ScriptValue upperValue(ScriptState*) const;
bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
bool upperOpen() const { return m_upperType == UpperBoundOpen; }
- static PassRefPtr<IDBKeyRange> only(ExecutionContext*, const ScriptValue& key, ExceptionState&);
- static PassRefPtr<IDBKeyRange> lowerBound(ExecutionContext*, const ScriptValue& bound, bool open, ExceptionState&);
- static PassRefPtr<IDBKeyRange> upperBound(ExecutionContext*, const ScriptValue& bound, bool open, ExceptionState&);
- static PassRefPtr<IDBKeyRange> bound(ExecutionContext*, const ScriptValue& lower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> only(ExecutionContext*, const ScriptValue& key, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> lowerBound(ExecutionContext*, const ScriptValue& bound, bool open, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> upperBound(ExecutionContext*, const ScriptValue& bound, bool open, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> bound(ExecutionContext*, const ScriptValue& lower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionState&);
- static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<IDBKeyRange> only(PassRefPtrWillBeRawPtr<IDBKey> value, ExceptionState&);
private:
- IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType);
+ IDBKeyRange(PassRefPtrWillBeRawPtr<IDBKey> lower, PassRefPtrWillBeRawPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType);
- RefPtr<IDBKey> m_lower;
- RefPtr<IDBKey> m_upper;
+ RefPtrWillBeMember<IDBKey> m_lower;
+ RefPtrWillBeMember<IDBKey> m_upper;
LowerBoundType m_lowerType;
UpperBoundType m_upperType;
};