Skip to content

Commit 132c067

Browse files
authored
Merge pull request #1611 from lulicdarko/RDKEMW-9893_loadWebInspector_from_widget_2.38
RDKEMW-9893: Load libWPEWebInspectorResources from launcher.
2 parents a7edb51 + b7dc4d4 commit 132c067

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ GRefPtr<GBytes> backendCommands()
4343
static bool moduleLoaded = false;
4444

4545
if (!moduleLoaded) {
46-
GModule* resourcesModule = g_module_open(PKGLIBDIR G_DIR_SEPARATOR_S "libWPEWebInspectorResources.so", G_MODULE_BIND_LAZY);
46+
const char* libDir = PKGLIBDIR;
47+
GUniquePtr<char> tmp;
48+
if (const char* path = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH"); path && g_file_test(path, G_FILE_TEST_IS_DIR)) {
49+
tmp.reset(g_build_filename(path, "..", nullptr));
50+
libDir = tmp.get();
51+
}
52+
GUniquePtr<char> bundleFilename(g_build_filename(libDir, "libWPEWebInspectorResources.so", nullptr));
53+
GModule* resourcesModule = g_module_open(bundleFilename.get(), G_MODULE_BIND_LAZY);
4754
if (!resourcesModule) {
4855
WTFLogAlways("Error loading libWPEWebInspectorResources.so: %s", g_module_error());
4956
return nullptr;

0 commit comments

Comments
 (0)