[Webkit-unassigned] [Bug 173757] [WPE] Use JSC API to send script messages from web extension in tests
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 23 03:10:01 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=173757
Zan Dobersek <zan at falconsigh.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zan at falconsigh.net
--- Comment #2 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 313694
--> https://bugs.webkit.org/attachment.cgi?id=313694
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=313694&action=review
> Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:266
> + GUniquePtr<char> escapedMessageString(static_cast<char*>(g_malloc(strlen(messageString.get()) * 2 + 1)));
> + char* src = messageString.get();
> + char* dest = escapedMessageString.get();
> + while (*src) {
> + if (*src == '"') {
> + *dest++ = '\\';
> + *dest++ = '"';
> + } else
> + *dest++ = *src;
> + src++;
> + }
> + *dest = '\0';
Would it be possible to use something like g_strescape() here? And use g_strcompress() on the receiving end, if necessary or possible?
Apart from that, src++ should be ++src.
--
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/20170623/2f42460d/attachment.html>
More information about the webkit-unassigned
mailing list