2018-04-19 17:44:42 +02:00
|
|
|
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
|
2021-12-16 23:35:54 +01:00
|
|
|
index f545c18c2e142..26757184a79d5 100644
|
2018-04-19 17:44:42 +02:00
|
|
|
--- third_party/blink/public/platform/platform.h
|
|
|
|
+++ third_party/blink/public/platform/platform.h
|
2021-12-16 23:35:54 +01:00
|
|
|
@@ -865,6 +865,11 @@ class BLINK_PLATFORM_EXPORT Platform {
|
2021-07-23 18:40:13 +02:00
|
|
|
const WebURL& url,
|
|
|
|
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {}
|
2018-04-19 17:44:42 +02:00
|
|
|
|
|
|
|
+ // DevTools ------------------------------------------------------------
|
|
|
|
+
|
|
|
|
+ virtual void DevToolsAgentAttached() {}
|
|
|
|
+ virtual void DevToolsAgentDetached() {}
|
|
|
|
+
|
2018-11-03 02:15:09 +01:00
|
|
|
private:
|
2020-06-09 19:48:00 +02:00
|
|
|
static void InitializeMainThreadCommon(Platform* platform,
|
|
|
|
std::unique_ptr<Thread> main_thread);
|
2018-11-03 02:15:09 +01:00
|
|
|
diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc
|
2021-12-16 23:35:54 +01:00
|
|
|
index 513bee6f4a3e3..df7c2512a343e 100644
|
2018-11-03 02:15:09 +01:00
|
|
|
--- third_party/blink/renderer/core/inspector/devtools_session.cc
|
|
|
|
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
|
2020-02-10 18:10:17 +01:00
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include <utility>
|
2019-10-01 15:55:16 +02:00
|
|
|
#include <vector>
|
2018-10-24 22:37:39 +02:00
|
|
|
|
|
|
|
+#include "third_party/blink/public/platform/platform.h"
|
2018-11-03 02:15:09 +01:00
|
|
|
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
|
|
|
|
#include "third_party/blink/renderer/core/frame/local_frame.h"
|
2019-09-04 17:13:32 +02:00
|
|
|
#include "third_party/blink/renderer/core/inspector/devtools_agent.h"
|
2021-08-20 01:40:49 +02:00
|
|
|
@@ -146,6 +147,7 @@ DevToolsSession::DevToolsSession(
|
2018-11-03 02:15:09 +01:00
|
|
|
for (wtf_size_t i = 0; i < agents_.size(); i++)
|
|
|
|
agents_[i]->Restore();
|
|
|
|
}
|
2018-10-24 22:37:39 +02:00
|
|
|
+ Platform::Current()->DevToolsAgentAttached();
|
|
|
|
}
|
|
|
|
|
2018-11-03 02:15:09 +01:00
|
|
|
DevToolsSession::~DevToolsSession() {
|
2021-08-20 01:40:49 +02:00
|
|
|
@@ -186,6 +188,7 @@ void DevToolsSession::Detach() {
|
2018-11-03 02:15:09 +01:00
|
|
|
agents_.clear();
|
|
|
|
v8_session_.reset();
|
|
|
|
agent_->client_->DebuggerTaskFinished();
|
2018-10-24 22:37:39 +02:00
|
|
|
+ Platform::Current()->DevToolsAgentDetached();
|
|
|
|
}
|
|
|
|
|
2020-04-14 21:31:00 +02:00
|
|
|
void DevToolsSession::DispatchProtocolCommand(
|