Inspector: Don't check that target has pledged "accept"

This check only existed to prevent crashing the target process back
when programs were listening for incoming Inspector connections.

Now that we talk to InspectorServer instead, and it already has a
communication channel with the target, this is no longer an issue.
This commit is contained in:
Andreas Kling 2021-05-13 23:26:23 +02:00
parent 31d4bcf5bf
commit 90e31b4f39
Notes: sideshowbarker 2024-07-18 18:12:19 +09:00

View file

@ -9,7 +9,6 @@
#include "RemoteObjectPropertyModel.h"
#include "RemoteProcess.h"
#include <AK/URL.h>
#include <LibCore/ProcessStatisticsReader.h>
#include <LibDesktop/Launcher.h>
#include <LibGUI/Application.h>
#include <LibGUI/BoxLayout.h>
@ -23,6 +22,7 @@
#include <LibGUI/TreeView.h>
#include <LibGUI/Window.h>
#include <stdio.h>
#include <unistd.h>
using namespace Inspector;
@ -97,19 +97,6 @@ int main(int argc, char** argv)
return 1;
}
auto all_processes = Core::ProcessStatisticsReader::get_all();
for (auto& it : all_processes.value()) {
if (it.value.pid != pid)
continue;
if (it.value.pledge.is_empty())
break;
if (!it.value.pledge.contains("accept")) {
GUI::MessageBox::show(window, String::formatted("{} ({}) has not pledged accept!", it.value.name, pid), "Error", GUI::MessageBox::Type::Error);
return 1;
}
break;
}
window->set_title("Inspector");
window->resize(685, 500);
window->set_icon(app_icon.bitmap_for_size(16));