Fix errors thrown due to platform libxml2 version upgrade from 2.11.5 -> 2.12.5 04/308804/7
authorGajendra N <gajendra.n@samsung.com>
Mon, 1 Apr 2024 08:40:35 +0000 (14:10 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 2 Apr 2024 10:35:12 +0000 (10:35 +0000)
libxml 2.10.5 :
  typedef void (*xmlStructuredErrorFunc) (void *userData, xmlError *error);

libxml 2.12.5 :
  typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);

Due to update in above func ptr signature, faced below error on blink side.

Error:
  [ 9063s] ../third_party/blink/renderer/core/xml/parser/xml_document_parser_scope.h:41:3:
    note: candidate constructor not viable: no known conversion from 'void (void *, xmlError *)' (aka 'void (void *, _xmlError *)')
      to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const _xmlError *)') for 3rd argument

Commit [1] enabled third_party/libxml, as QB build was throwing above error.
But due to unexpected crash on TERMS webview app, [1] is now partially reverted to
use system libxml2, and additional changes are done on Blink side to handle above error.

[1] 98565b6bd0df2aaa35f21f30f0bd81ed718b2cf5

Change-Id: I963a42fb3fd1f16d41aca5d85e38f18b626a9cbc
Signed-off-by: Gajendra N <gajendra.n@samsung.com>
third_party/blink/renderer/core/xml/xslt_processor.h
third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
tizen_src/build/common.sh

index d53835e..6bef096 100644 (file)
@@ -77,7 +77,11 @@ class XSLTProcessor final : public ScriptWrappable {
 
   void reset();
 
+#if LIBXML_VERSION >= 21205
+  static void ParseErrorFunc(void* user_data, const xmlError*);
+#else
   static void ParseErrorFunc(void* user_data, xmlError*);
+#endif
   static void GenericErrorFunc(void* user_data, const char* msg, ...);
 
   // Only for libXSLT callbacks
index 133e0b3..26de815 100644 (file)
@@ -66,7 +66,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) {
   // It would be nice to do something with this error message.
 }
 
+#if LIBXML_VERSION >= 21205
+void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
+#else
 void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
+#endif
   FrameConsole* console = static_cast<FrameConsole*>(user_data);
   if (!console)
     return;
index 8248d7e..7ed7887 100755 (executable)
@@ -25,6 +25,7 @@ function getSystemDeps() {
   local platform=$1
   local system_deps="--system-libraries
                      libpng
+                     libxml
                      libxslt
                      zlib
                     "