Title: [254852] trunk/Source/WebKit
Revision
254852
Author
[email protected]
Date
2020-01-21 07:39:51 -0800 (Tue, 21 Jan 2020)

Log Message

[GTK][WPE] TestWebKitUserContentFilterStore is crashing
https://bugs.webkit.org/show_bug.cgi?id=206527

Patch by Alejandro G. Castro <[email protected]> on 2020-01-21
Reviewed by Adrian Perez de Castro.

We are asserting looking for a category of error when converting
in the toGError function, but depending on the function called the
category can be different.

* UIProcess/API/glib/WebKitUserContentFilterStore.cpp:
(toGError):
(webkitUserContentFilterStoreSaveBytes): Moved the ASSERT to the
function that uses this category, the other functions calling
toGError were already ASSERTing the correct category.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (254851 => 254852)


--- trunk/Source/WebKit/ChangeLog	2020-01-21 15:38:05 UTC (rev 254851)
+++ trunk/Source/WebKit/ChangeLog	2020-01-21 15:39:51 UTC (rev 254852)
@@ -1,3 +1,20 @@
+2020-01-21  Alejandro G. Castro  <[email protected]>
+
+        [GTK][WPE] TestWebKitUserContentFilterStore is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=206527
+
+        Reviewed by Adrian Perez de Castro.
+
+        We are asserting looking for a category of error when converting
+        in the toGError function, but depending on the function called the
+        category can be different.
+
+        * UIProcess/API/glib/WebKitUserContentFilterStore.cpp:
+        (toGError):
+        (webkitUserContentFilterStoreSaveBytes): Moved the ASSERT to the
+        function that uses this category, the other functions calling
+        toGError were already ASSERTing the correct category.
+
 2020-01-21  Carlos Garcia Campos  <[email protected]>
 
         [GTK][WPE] Enable WebGL by default

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitUserContentFilterStore.cpp (254851 => 254852)


--- trunk/Source/WebKit/UIProcess/API/glib/WebKitUserContentFilterStore.cpp	2020-01-21 15:38:05 UTC (rev 254851)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitUserContentFilterStore.cpp	2020-01-21 15:39:51 UTC (rev 254852)
@@ -70,7 +70,6 @@
 static inline GError* toGError(WebKitUserContentFilterError code, const std::error_code error)
 {
     ASSERT(error);
-    ASSERT(error.category() == WebCore::ContentExtensions::contentExtensionErrorCategory());
     return g_error_new_literal(WEBKIT_USER_CONTENT_FILTER_ERROR, code, error.message().c_str());
 }
 
@@ -187,9 +186,10 @@
         if (g_task_return_error_if_cancelled(task.get()))
             return;
 
-        if (error)
+        if (error) {
+            ASSERT(error.category() == WebCore::ContentExtensions::contentExtensionErrorCategory());
             g_task_return_error(task.get(), toGError(WEBKIT_USER_CONTENT_FILTER_ERROR_INVALID_SOURCE, error));
-        else
+        } else
             g_task_return_pointer(task.get(), webkitUserContentFilterCreate(WTFMove(contentRuleList)), reinterpret_cast<GDestroyNotify>(webkit_user_content_filter_unref));
     });
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to