Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: Source/modules/indexeddb/IDBKeyRange.h

Issue 236783002: Pass NewScriptState to idbAnyToScriptValue() and idbKeyToScriptValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBIndex.idl ('k') | Source/modules/indexeddb/IDBKeyRange.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 // Null if the script value is null or undefined, the range if it is one, ot herwise tries to convert to a key and throws if it fails. 54 // Null if the script value is null or undefined, the range if it is one, ot herwise tries to convert to a key and throws if it fails.
55 static PassRefPtr<IDBKeyRange> fromScriptValue(ExecutionContext*, const Scri ptValue&, ExceptionState&); 55 static PassRefPtr<IDBKeyRange> fromScriptValue(ExecutionContext*, const Scri ptValue&, ExceptionState&);
56 56
57 ~IDBKeyRange() { } 57 ~IDBKeyRange() { }
58 58
59 // Implement the IDBKeyRange IDL 59 // Implement the IDBKeyRange IDL
60 PassRefPtr<IDBKey> lower() const { return m_lower; } 60 PassRefPtr<IDBKey> lower() const { return m_lower; }
61 PassRefPtr<IDBKey> upper() const { return m_upper; } 61 PassRefPtr<IDBKey> upper() const { return m_upper; }
62 62
63 ScriptValue lowerValue(ExecutionContext*) const; 63 ScriptValue lowerValue(NewScriptState*) const;
64 ScriptValue upperValue(ExecutionContext*) const; 64 ScriptValue upperValue(NewScriptState*) const;
65 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; } 65 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
66 bool upperOpen() const { return m_upperType == UpperBoundOpen; } 66 bool upperOpen() const { return m_upperType == UpperBoundOpen; }
67 67
68 static PassRefPtr<IDBKeyRange> only(ExecutionContext*, const ScriptValue& ke y, ExceptionState&); 68 static PassRefPtr<IDBKeyRange> only(ExecutionContext*, const ScriptValue& ke y, ExceptionState&);
69 static PassRefPtr<IDBKeyRange> lowerBound(ExecutionContext*, const ScriptVal ue& bound, bool open, ExceptionState&); 69 static PassRefPtr<IDBKeyRange> lowerBound(ExecutionContext*, const ScriptVal ue& bound, bool open, ExceptionState&);
70 static PassRefPtr<IDBKeyRange> upperBound(ExecutionContext*, const ScriptVal ue& bound, bool open, ExceptionState&); 70 static PassRefPtr<IDBKeyRange> upperBound(ExecutionContext*, const ScriptVal ue& bound, bool open, ExceptionState&);
71 static PassRefPtr<IDBKeyRange> bound(ExecutionContext*, const ScriptValue& l ower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionState&) ; 71 static PassRefPtr<IDBKeyRange> bound(ExecutionContext*, const ScriptValue& l ower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionState&) ;
72 72
73 static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionState &); 73 static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionState &);
74 74
75 private: 75 private:
76 IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundTy pe lowerType, UpperBoundType upperType); 76 IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundTy pe lowerType, UpperBoundType upperType);
77 77
78 RefPtr<IDBKey> m_lower; 78 RefPtr<IDBKey> m_lower;
79 RefPtr<IDBKey> m_upper; 79 RefPtr<IDBKey> m_upper;
80 LowerBoundType m_lowerType; 80 LowerBoundType m_lowerType;
81 UpperBoundType m_upperType; 81 UpperBoundType m_upperType;
82 }; 82 };
83 83
84 } // namespace WebCore 84 } // namespace WebCore
85 85
86 #endif // IDBKeyRange_h 86 #endif // IDBKeyRange_h
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBIndex.idl ('k') | Source/modules/indexeddb/IDBKeyRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698