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

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

Issue 367113005: Remove destructors from ScriptWrappable objects in modules/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add Finalizable transition type Created 6 years, 5 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
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 16 matching lines...) Expand all
27 #define IDBKeyRange_h 27 #define IDBKeyRange_h
28 28
29 #include "bindings/core/v8/Dictionary.h" 29 #include "bindings/core/v8/Dictionary.h"
30 #include "bindings/core/v8/ScriptWrappable.h" 30 #include "bindings/core/v8/ScriptWrappable.h"
31 #include "modules/indexeddb/IDBKey.h" 31 #include "modules/indexeddb/IDBKey.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 class ExceptionState; 35 class ExceptionState;
36 36
37 class IDBKeyRange : public GarbageCollectedFinalized<IDBKeyRange>, public Script Wrappable { 37 class IDBKeyRange FINAL : public GarbageCollectedFinalizedWillBeGarbageCollected <IDBKeyRange>, public ScriptWrappable {
38 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(IDBKeyRange);
38 public: 39 public:
39 enum LowerBoundType { 40 enum LowerBoundType {
40 LowerBoundOpen, 41 LowerBoundOpen,
41 LowerBoundClosed 42 LowerBoundClosed
42 }; 43 };
43 enum UpperBoundType { 44 enum UpperBoundType {
44 UpperBoundOpen, 45 UpperBoundOpen,
45 UpperBoundClosed 46 UpperBoundClosed
46 }; 47 };
47 48
48 static IDBKeyRange* create(IDBKey* lower, IDBKey* upper, LowerBoundType lowe rType, UpperBoundType upperType) 49 static IDBKeyRange* create(IDBKey* lower, IDBKey* upper, LowerBoundType lowe rType, UpperBoundType upperType)
49 { 50 {
50 return new IDBKeyRange(lower, upper, lowerType, upperType); 51 return new IDBKeyRange(lower, upper, lowerType, upperType);
51 } 52 }
52 // 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. 53 // 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.
53 static IDBKeyRange* fromScriptValue(ExecutionContext*, const ScriptValue&, E xceptionState&); 54 static IDBKeyRange* fromScriptValue(ExecutionContext*, const ScriptValue&, E xceptionState&);
54 55
55 ~IDBKeyRange() { }
56 void trace(Visitor*); 56 void trace(Visitor*);
57 57
58 // Implement the IDBKeyRange IDL 58 // Implement the IDBKeyRange IDL
59 IDBKey* lower() const { return m_lower.get(); } 59 IDBKey* lower() const { return m_lower.get(); }
60 IDBKey* upper() const { return m_upper.get(); } 60 IDBKey* upper() const { return m_upper.get(); }
61 61
62 ScriptValue lowerValue(ScriptState*) const; 62 ScriptValue lowerValue(ScriptState*) const;
63 ScriptValue upperValue(ScriptState*) const; 63 ScriptValue upperValue(ScriptState*) const;
64 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; } 64 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
65 bool upperOpen() const { return m_upperType == UpperBoundOpen; } 65 bool upperOpen() const { return m_upperType == UpperBoundOpen; }
(...skipping 10 matching lines...) Expand all
76 76
77 Member<IDBKey> m_lower; 77 Member<IDBKey> m_lower;
78 Member<IDBKey> m_upper; 78 Member<IDBKey> m_upper;
79 LowerBoundType m_lowerType; 79 LowerBoundType m_lowerType;
80 UpperBoundType m_upperType; 80 UpperBoundType m_upperType;
81 }; 81 };
82 82
83 } // namespace WebCore 83 } // namespace WebCore
84 84
85 #endif // IDBKeyRange_h 85 #endif // IDBKeyRange_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698