Commit 21fac899 authored by tkent@chromium.org's avatar tkent@chromium.org

Oilpan: Remove converters between Persistent/Member and PassRefPtr/RefPtr.

Also, remove remaining RefPtr<MIDIPort>, the last user of one of the converters.

BUG=357163

Review URL: https://codereview.chromium.org/331493007

git-svn-id: svn://svn.chromium.org/blink/trunk@176063 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e66e0c20
......@@ -437,7 +437,7 @@ bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value) const
return true;
}
bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const
bool Dictionary::get(const String& key, RefPtrWillBeMember<MIDIPort>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value))
......
......@@ -88,7 +88,7 @@ public:
bool get(const String&, MessagePortArray&) const;
bool get(const String&, RefPtr<Uint8Array>&) const;
bool get(const String&, RefPtr<ArrayBufferView>&) const;
bool get(const String&, RefPtr<MIDIPort>&) const;
bool get(const String&, RefPtrWillBeMember<MIDIPort>&) const;
bool get(const String&, RefPtr<MediaKeyError>&) const;
bool get(const String&, RefPtrWillBeMember<TrackBase>&) const;
bool get(const String&, Member<SpeechRecognitionResult>&) const;
......
......@@ -40,9 +40,9 @@ struct MIDIConnectionEventInit : public EventInit {
MIDIConnectionEventInit()
: port(nullptr)
{
};
}
RefPtr<MIDIPort> port;
RefPtrWillBeMember<MIDIPort> port;
};
class MIDIConnectionEvent FINAL : public Event {
......
......@@ -360,9 +360,6 @@ public:
operator T*() const { return m_raw; }
operator RawPtr<T>() const { return m_raw; }
// FIXME: Oilpan: Remove this ASAP. Only here to make Node transition easier.
template<typename U>
operator PassRefPtr<U>() { return PassRefPtr<U>(m_raw); }
T* operator->() const { return *this; }
......@@ -529,14 +526,6 @@ public:
template<typename U>
Member(const Member<U>& other) : m_raw(other) { }
// FIXME: Oilpan: Get rid of these ASAP; this is only here to make
// Node hierarchy transition easier.
template<typename U>
Member(const PassRefPtr<U>& other) : m_raw(other.get()) { }
template<typename U>
Member(const RefPtr<U>& other) : m_raw(other.get()) { }
T* release()
{
T* result = m_raw;
......@@ -600,10 +589,6 @@ public:
void clear() { m_raw = 0; }
// FIXME: Oilpan: Remove this ASAP. Only here to make Node transition easier.
template<typename U>
operator PassRefPtr<U>() { return PassRefPtr<U>(m_raw); }
protected:
void verifyTypeIsGarbageCollected() const
{
......@@ -751,16 +736,6 @@ template<typename T, typename U> inline bool operator!=(const Persistent<T>& a,
template<typename T, typename U> inline bool operator==(const Persistent<T>& a, const Persistent<U>& b) { return a.get() == b.get(); }
template<typename T, typename U> inline bool operator!=(const Persistent<T>& a, const Persistent<U>& b) { return a.get() != b.get(); }
// FIXME: Oilpan: Get rid of these ASAP; only here to make Node transition easier.
template<typename T, typename U> inline bool operator==(const Member<T>& a, const RefPtr<U>& b) { return a.get() == b.get(); }
template<typename T, typename U> inline bool operator!=(const Member<T>& a, const RefPtr<U>& b) { return a.get() != b.get(); }
template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const Member<U>& b) { return a.get() == b.get(); }
template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const Member<U>& b) { return a.get() != b.get(); }
template<typename T, typename U> inline bool operator==(const Member<T>& a, const PassRefPtr<U>& b) { return a.get() == b.get(); }
template<typename T, typename U> inline bool operator!=(const Member<T>& a, const PassRefPtr<U>& b) { return a.get() != b.get(); }
template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const Member<U>& b) { return a.get() == b.get(); }
template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const Member<U>& b) { return a.get() != b.get(); }
// CPP-defined type names for the transition period where we want to
// support both reference counting and garbage collection based on a
// compile-time flag.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment