<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [SOUP] Issues with CustomProtocolManagerImpl::registerScheme?"
   href="https://bugs.webkit.org/show_bug.cgi?id=155080">155080</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[SOUP] Issues with CustomProtocolManagerImpl::registerScheme?
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Gtk
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcatanzaro&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I don't understand the implementation of CustomProtocolManagerImpl::registerScheme.

 * It calls g_type_class_ref twice for no apparent reason, and with no paired calls to g_type_class_unref that I could find. The second use should probably be g_type_class_peek instead. Maybe the first use should be paired with a g_type_class_unref somewhere. Even if we don't care about leaking the class struct, I don't see why we should ref it twice in the same place.
 * It assigns |this| to the |client| member of WebKitSoupRequestGenericClass, but that means it will clobber any other CustomProtocolManagerImpls that have previously registered themselves with the WebKitSoupRequestGenericClass struct. I guess only a single CustomProtocolManagerImpl is ever intended to be created, but it's not a singleton, so it feels kinda fragile.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>