Skip to content
Permalink
Browse files
[Flatpak SDK][WPE] Launching the remote inspector kills MB
https://bugs.webkit.org/show_bug.cgi?id=213899

Patch by Philippe Normand <pnormand@igalia.com> on 2020-09-16
Reviewed by Adrian Perez de Castro.

Load inspector resources from developer build artefacts, when the inspector server is
running in this configuration. Fall back to system libraries loading mechanism otherwise.

* inspector/remote/glib/RemoteInspectorUtils.cpp:
(Inspector::backendCommands):

Canonical link: https://commits.webkit.org/229435@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Sep 16, 2020
1 parent dd9b668 commit 2313edaf8b60a5ff2661480f4ba614fe8bd780c8
Showing with 24 additions and 1 deletion.
  1. +13 −0 Source/JavaScriptCore/ChangeLog
  2. +11 −1 Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.cpp
@@ -1,3 +1,16 @@
2020-09-16 Philippe Normand <pnormand@igalia.com>

[Flatpak SDK][WPE] Launching the remote inspector kills MB
https://bugs.webkit.org/show_bug.cgi?id=213899

Reviewed by Adrian Perez de Castro.

Load inspector resources from developer build artefacts, when the inspector server is
running in this configuration. Fall back to system libraries loading mechanism otherwise.

* inspector/remote/glib/RemoteInspectorUtils.cpp:
(Inspector::backendCommands):

2020-09-16 Adrian Perez de Castro <aperez@igalia.com>

Non-unified build fixes, early September 2020 edition
@@ -31,6 +31,7 @@
#include <gio/gio.h>
#include <mutex>
#include <wtf/SHA1.h>
#include <wtf/glib/GUniquePtr.h>

#define INSPECTOR_BACKEND_COMMANDS_PATH "/org/webkit/inspector/UserInterface/Protocol/InspectorBackendCommands.js"

@@ -41,7 +42,16 @@ GRefPtr<GBytes> backendCommands()
#if PLATFORM(WPE)
static std::once_flag flag;
std::call_once(flag, [] {
GModule* resourcesModule = g_module_open(PKGLIBDIR G_DIR_SEPARATOR_S "libWPEWebInspectorResources.so", G_MODULE_BIND_LAZY);
const char* libDir = PKGLIBDIR;
#if ENABLE(DEVELOPER_MODE)
// Probably no need for a specific env var here. Assume the inspector resources.so file is
// in the same directory as the injected bundle lib, for developer builds.
const char* path = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH");
if (path && g_file_test(path, G_FILE_TEST_IS_DIR))
libDir = path;
#endif
GUniquePtr<char> bundleFilename(g_build_filename(libDir, "libWPEWebInspectorResources.so", nullptr));
GModule* resourcesModule = g_module_open(bundleFilename.get(), G_MODULE_BIND_LAZY);
if (!resourcesModule) {
WTFLogAlways("Error loading libWPEWebInspectorResources.so: %s", g_module_error());
return;

0 comments on commit 2313eda

Please sign in to comment.