[webkit-changes] [WebKit/WebKit] a6d516: [JSC][GLib] Make types final in 2022 API

Adrian Perez noreply at github.com
Mon Feb 13 14:33:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6d516900ca2f08da7ebcc3aa888b603d9681b93
      https://github.com/WebKit/WebKit/commit/a6d516900ca2f08da7ebcc3aa888b603d9681b93
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M Source/JavaScriptCore/API/glib/JSCClass.cpp
    R Source/JavaScriptCore/API/glib/JSCClass.h
    A Source/JavaScriptCore/API/glib/JSCClass.h.in
    M Source/JavaScriptCore/API/glib/JSCContext.cpp
    R Source/JavaScriptCore/API/glib/JSCContext.h
    A Source/JavaScriptCore/API/glib/JSCContext.h.in
    R Source/JavaScriptCore/API/glib/JSCDefines.h
    A Source/JavaScriptCore/API/glib/JSCDefines.h.in
    M Source/JavaScriptCore/API/glib/JSCException.cpp
    R Source/JavaScriptCore/API/glib/JSCException.h
    A Source/JavaScriptCore/API/glib/JSCException.h.in
    M Source/JavaScriptCore/API/glib/JSCValue.cpp
    R Source/JavaScriptCore/API/glib/JSCValue.h
    A Source/JavaScriptCore/API/glib/JSCValue.h.in
    M Source/JavaScriptCore/API/glib/JSCVirtualMachine.cpp
    R Source/JavaScriptCore/API/glib/JSCVirtualMachine.h
    A Source/JavaScriptCore/API/glib/JSCVirtualMachine.h.in
    M Source/JavaScriptCore/API/glib/JSCWeakValue.cpp
    R Source/JavaScriptCore/API/glib/JSCWeakValue.h
    A Source/JavaScriptCore/API/glib/JSCWeakValue.h.in
    R Source/JavaScriptCore/API/glib/jsc.h
    A Source/JavaScriptCore/API/glib/jsc.h.in
    M Source/JavaScriptCore/GLib.cmake
    R Source/WebKit/GLib.cmake
    M Source/WebKit/PlatformGTK.cmake
    M Source/WebKit/PlatformWPE.cmake
    A Source/cmake/GLibMacros.cmake
    M Tools/TestWebKitAPI/PlatformGTK.cmake
    M Tools/TestWebKitAPI/PlatformWPE.cmake

  Log Message:
  -----------
  [JSC][GLib] Make types final in 2022 API
https://bugs.webkit.org/show_bug.cgi?id=252162

Reviewed by Michael Catanzaro.

Switch the GLib JSC API to use WEBKIT_DEFINE_FINAL_TYPE in combination
with a new JSC_DECLARE_FINAL_TYPE macro for the public headers, modeled
after the WEBKIT_DECLARE_FINAL_TYPE macro from 260190 at main. Applying the
same treatment to the JSC GLib types makes the 2022 API more coherent
and further reduces the amount of boilerplate code written manually, by
offloading the grunt work to the preprocessor macros.

The existing GENERATE_API_HEADERS macro get reused (and slightly
generalized) by moving it into a shared GLibMacros.cmake module, and
pressed into service to turn the JSC GLib API headers into templates.
All the autocleanups for JSC API types get ultimately defined by the
G_DECLARE_FINAL_TYPE macro, therefore the JSCAutocleanups.h header
installation get completely skipped with the new 2022 API.

* Source/JavaScriptCore/API/glib/JSCClass.cpp:
* Source/JavaScriptCore/API/glib/JSCClass.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCClass.h.
* Source/JavaScriptCore/API/glib/JSCContext.cpp:
* Source/JavaScriptCore/API/glib/JSCContext.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCContext.h.
* Source/JavaScriptCore/API/glib/JSCDefines.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCDefines.h.
* Source/JavaScriptCore/API/glib/JSCException.cpp:
* Source/JavaScriptCore/API/glib/JSCException.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCException.h.
* Source/JavaScriptCore/API/glib/JSCValue.cpp:
* Source/JavaScriptCore/API/glib/JSCValue.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCValue.h.
* Source/JavaScriptCore/API/glib/JSCVirtualMachine.cpp:
* Source/JavaScriptCore/API/glib/JSCVirtualMachine.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCVirtualMachine.h.
* Source/JavaScriptCore/API/glib/JSCWeakValue.cpp:
* Source/JavaScriptCore/API/glib/JSCWeakValue.h.in: Renamed from Source/JavaScriptCore/API/glib/JSCWeakValue.h.
* Source/JavaScriptCore/API/glib/jsc.h.in: Renamed from Source/JavaScriptCore/API/glib/jsc.h.
* Source/JavaScriptCore/GLib.cmake:
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/PlatformWPE.cmake:
* Source/cmake/GLibMacros.cmake: Renamed from Source/WebKit/GLib.cmake.
* Tools/TestWebKitAPI/PlatformGTK.cmake:
* Tools/TestWebKitAPI/PlatformWPE.cmake:

Canonical link: https://commits.webkit.org/260220@main




More information about the webkit-changes mailing list