Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion browser_patches/webkit/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1272
1273
17 changes: 13 additions & 4 deletions browser_patches/webkit/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -10222,10 +10222,10 @@ index 0000000000000000000000000000000000000000..f356c613945fd263889bc74166bef2b2
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ebe29e3f923b3cd74b9595328fce85359e19a741
index 0000000000000000000000000000000000000000..cea80a8f37fe56b3dc6eb3b36744c70c43a74282
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
@@ -0,0 +1,810 @@
@@ -0,0 +1,819 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
Expand Down Expand Up @@ -10515,6 +10515,9 @@ index 0000000000000000000000000000000000000000..ebe29e3f923b3cd74b9595328fce8535
+void InspectorPlaywrightAgent::dispatchMessageFromFrontend(const String& message)
+{
+ m_backendDispatcher->dispatch(message, [&](const RefPtr<JSON::Object>& messageObject) {
+ RefPtr<JSON::Value> idValue;
+ if (!messageObject->getValue("id"_s, idValue))
+ return BackendDispatcher::InterceptionResult::Continue;
+ RefPtr<JSON::Value> pageProxyIDValue;
+ if (!messageObject->getValue("pageProxyId"_s, pageProxyIDValue))
+ return BackendDispatcher::InterceptionResult::Continue;
Expand All @@ -10526,13 +10529,19 @@ index 0000000000000000000000000000000000000000..ebe29e3f923b3cd74b9595328fce8535
+ return BackendDispatcher::InterceptionResult::Intercepted;
+ }
+
+
+ if (auto pageProxyChannel = m_pageProxyChannels.get(pageProxyID)) {
+ pageProxyChannel->dispatchMessageFromFrontend(message);
+ return BackendDispatcher::InterceptionResult::Intercepted;
+ }
+
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidRequest, "Cannot find page proxy with provided 'pageProxyId'"_s);
+ long requestId = 0;
+ if (!idValue->asInteger(requestId)) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidRequest, "The type of 'id' must be number"_s);
+ m_backendDispatcher->sendPendingErrors();
+ return BackendDispatcher::InterceptionResult::Intercepted;
+ }
+
+ m_backendDispatcher->reportProtocolError(requestId, BackendDispatcher::InvalidParams, "Cannot find page proxy with provided 'pageProxyId'"_s);
+ m_backendDispatcher->sendPendingErrors();
+ return BackendDispatcher::InterceptionResult::Intercepted;
+ });
Expand Down