Changeset 48486 in webkit
- Timestamp:
- Sep 17, 2009 12:59:50 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r48483 r48486 1 2009-09-17 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 [V8] OwnHandle might get a weak callback after destruction 6 https://bugs.webkit.org/show_bug.cgi?id=29172 7 8 Be sure to clear out weak reference so we don't get a weak callback 9 after we've destructed ourselves. Also, removed some tricky methods 10 that had no clients. 11 12 * bindings/v8/OwnHandle.h: 13 (WebCore::OwnHandle::clear): 14 1 15 2009-09-17 Dimitri Glazkov <dglazkov@chromium.org> 2 16 -
trunk/WebCore/bindings/v8/OwnHandle.h
r46839 r48486 46 46 void set(v8::Handle<T> handle) { clear(); m_handle = v8::Persistent<T>::New(handle); } 47 47 48 // FIXME: What if we release a weak handle? Won't the callback do the wrong thing?49 v8::Persistent<T> release() { v8::Persistent<T> result = m_handle; m_handle.Clear(); return result; }50 void adopt(v8::Persistent<T> handle) { clear(); m_handle = handle; }51 52 48 // Note: This is clear in the OwnPtr sense, not the v8::Handle sense. 53 49 void clear() … … 55 51 if (m_handle.IsEmpty()) 56 52 return; 53 if (m_handle.IsWeak()) 54 m_handle.ClearWeak(); 57 55 m_handle.Dispose(); 58 56 m_handle.Clear();
Note: See TracChangeset
for help on using the changeset viewer.