[Webkit-unassigned] [Bug 37154] V8CustomIDBCallbacks<> should not hold a reference to the frame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 6 11:56:07 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37154





--- Comment #4 from Adam Barth <abarth at webkit.org>  2010-04-06 11:56:06 PST ---
+     v8::Persistent<v8::Object> m_onSuccess;
+     v8::Persistent<v8::Object> m_onError;

Please use OwnHandle instead to avoid manual new/dispose.

+ class V8CustomIDBCallbacks : public IDBCallbacks<ResultType> {

I wish the base class where were more abstract so it could be used by non-DB
callbacks.

As another approach, you could make a more complex object for m_onSuccess
instead of just holding a V8 handle.  That object could encapsulate the world
handle / activeDOMObject logic.  Then V8CustomIDBCallbacks could be a simple
composition of the callbacks.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list