Summary: | [GTK] Dot not allow to create delete-on-destroy GMainLoopSources | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||
Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | gustavo, zan | ||||||
Priority: | P2 | Keywords: | Gtk | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Carlos Garcia Campos
2014-09-18 08:09:37 PDT
Created attachment 238309 [details]
Patch
Created attachment 238310 [details]
Patch
Comment on attachment 238310 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238310&action=review > Source/WTF/wtf/gobject/GMainLoopSource.cpp:36 > -GMainLoopSource& GMainLoopSource::createAndDeleteOnDestroy() > +GMainLoopSource& GMainLoopSource::create() I think this name should be kept, otherwise it may lead people to believe that this is the default or only way of creating, like on other objects, it gets confusing. > Source/WTF/wtf/gobject/GMainLoopSource.cpp:-85 > - // Delete-on-destroy GMainLoopSource objects can only be cancelled when there's callback either scheduled > - // or in the middle of dispatch. At that point cancellation will have no effect. > - ASSERT(m_deleteOnDestroy != DeleteOnDestroy || (m_status == Ready && !m_context.source)); Heh, this was a bit weird. (In reply to comment #3) > (From update of attachment 238310 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238310&action=review > > > Source/WTF/wtf/gobject/GMainLoopSource.cpp:36 > > -GMainLoopSource& GMainLoopSource::createAndDeleteOnDestroy() > > +GMainLoopSource& GMainLoopSource::create() > > I think this name should be kept, otherwise it may lead people to believe that this is the default or only way of creating, like on other objects, it gets confusing. But I made it private for that reason, so it can only be created inside the object. > > Source/WTF/wtf/gobject/GMainLoopSource.cpp:-85 > > - // Delete-on-destroy GMainLoopSource objects can only be cancelled when there's callback either scheduled > > - // or in the middle of dispatch. At that point cancellation will have no effect. > > - ASSERT(m_deleteOnDestroy != DeleteOnDestroy || (m_status == Ready && !m_context.source)); > > Heh, this was a bit weird. Yes. Committed r173749: <http://trac.webkit.org/changeset/173749> |