[Webkit-unassigned] [Bug 139491] [GTK] Add initial database process support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 22 10:30:41 PST 2015


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

--- Comment #18 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 245132
  --> https://bugs.webkit.org/attachment.cgi?id=245132
Rebased patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245132&action=review

> Source/WTF/wtf/gobject/GRefPtr.cpp:102
> +template <> void derefGPtr(GVariantBuilder* ptr)
> +{
> +    g_variant_builder_unref(ptr);
> +}

Safe to call g_variant_builder_unref() without a null check on ptr, like in refGPtr() for GVariantBuilder?

> Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:196
> +    RefPtr<DatabaseToWebProcessConnection> connection = DatabaseToWebProcessConnection::create(socketPair.server);
> +    m_databaseToWebProcessConnections.append(connection.release());

Can you inline the DatabaseToWebProcessConnection::create() call?

> Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:199
> +    IPC::Attachment clientSocket(socketPair.client);
> +    parentProcessConnection()->send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(clientSocket), 0);

Can you inline the IPC::Attachment construction?

> Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h:43
> +#endif // DatabaseProcessMainUnix_h
> +
> +#endif // ENABLE(DATABASE_PROCESS)

The comments for the build guards are reversed here.

>> Source/WebKit2/Shared/gtk/KeyedDecoder.cpp:79
>> +
> 
> This and the following 4 decodeXXX look almost the same, I think we can create a macro with this code, the unique difference is the g_variant_get_XXX call, which can be generated by the macro using a passed in argument. So the body of those methods would be simply something like DECODE(key, result, boolean) or DECODE(key, result, int32) ...

You get a golden r+ for using templates instead of macros.

> Source/WebKit2/Shared/gtk/KeyedEncoder.h:52
> +    virtual void encodeBytes(const String& key, const uint8_t*, size_t) override;
> +    virtual void encodeBool(const String& key, bool) override;
> +    virtual void encodeUInt32(const String& key, uint32_t) override;
> +    virtual void encodeInt32(const String& key, int32_t) override;
> +    virtual void encodeInt64(const String& key, int64_t) override;
> +    virtual void encodeFloat(const String& key, float) override;
> +    virtual void encodeDouble(const String& key, double) override;
> +    virtual void encodeString(const String& key, const String&) override;

Same here, it might be possible to implement these through macros or templates.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150122/cdca908d/attachment-0002.html>


More information about the webkit-unassigned mailing list