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

Side by Side Diff: Source/web/WebIDBKeyRange.cpp

Issue 168963003: Make WebPrivatePtr capable of wrapping garbage collected objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Temporarily drop back to using .reset() instead of nullptr. Created 6 years, 10 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 23 matching lines...) Expand all
34 34
35 namespace blink { 35 namespace blink {
36 36
37 void WebIDBKeyRange::assign(const WebIDBKeyRange& other) 37 void WebIDBKeyRange::assign(const WebIDBKeyRange& other)
38 { 38 {
39 m_private = other.m_private; 39 m_private = other.m_private;
40 } 40 }
41 41
42 void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) 42 void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen)
43 { 43 {
44 // FIXME: replace reset() with nullptr assignment (cf. https://codereview.ch romium.org/170603003/ )
44 if (!lower.isValid() && !upper.isValid()) 45 if (!lower.isValid() && !upper.isValid())
45 m_private = 0; 46 m_private.reset();
46 else 47 else
47 m_private = IDBKeyRange::create(lower, upper, lowerOpen ? IDBKeyRange::L owerBoundOpen : IDBKeyRange::LowerBoundClosed, upperOpen ? IDBKeyRange::UpperBou ndOpen : IDBKeyRange::UpperBoundClosed); 48 m_private = IDBKeyRange::create(lower, upper, lowerOpen ? IDBKeyRange::L owerBoundOpen : IDBKeyRange::LowerBoundClosed, upperOpen ? IDBKeyRange::UpperBou ndOpen : IDBKeyRange::UpperBoundClosed);
48 } 49 }
49 50
50 void WebIDBKeyRange::reset() 51 void WebIDBKeyRange::reset()
51 { 52 {
52 m_private.reset(); 53 m_private.reset();
53 } 54 }
54 55
55 WebIDBKey WebIDBKeyRange::lower() const 56 WebIDBKey WebIDBKeyRange::lower() const
(...skipping 30 matching lines...) Expand all
86 m_private = value; 87 m_private = value;
87 return *this; 88 return *this;
88 } 89 }
89 90
90 WebIDBKeyRange::operator PassRefPtr<IDBKeyRange>() const 91 WebIDBKeyRange::operator PassRefPtr<IDBKeyRange>() const
91 { 92 {
92 return m_private.get(); 93 return m_private.get();
93 } 94 }
94 95
95 } // namespace blink 96 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698