Skip to content

Commit

Permalink
browser(webkit): do not crash when opening web inspector (#3631)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Aug 26, 2020
1 parent f9eeb29 commit 80cf7e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions browser_patches/webkit/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1333
Changed: [email protected] Tue Aug 25 15:39:47 PDT 2020
1334
Changed: [email protected] Tue Aug 25 18:01:13 PDT 2020
11 changes: 9 additions & 2 deletions browser_patches/webkit/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -9999,10 +9999,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..2c5e2bc04b51b39ae4f3128c86afb29e0042b968
index 0000000000000000000000000000000000000000..8e3989ef7f9947c685dcbe30d58561dab7f5ea5b
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
@@ -0,0 +1,848 @@
@@ -0,0 +1,855 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
Expand Down Expand Up @@ -10043,6 +10043,7 @@ index 0000000000000000000000000000000000000000..2c5e2bc04b51b39ae4f3128c86afb29e
+#include "WebAutomationSession.h"
+#include "WebGeolocationManagerProxy.h"
+#include "WebGeolocationPosition.h"
+#include "WebInspectorUtilities.h"
+#include "WebPageInspectorController.h"
+#include "WebPageInspectorTarget.h"
+#include "WebPageProxy.h"
Expand Down Expand Up @@ -10327,6 +10328,9 @@ index 0000000000000000000000000000000000000000..2c5e2bc04b51b39ae4f3128c86afb29e
+ if (!m_isEnabled)
+ return;
+
+ if (isInspectorProcessPool(page.process().processPool()))
+ return;
+
+ ASSERT(m_frontendChannel);
+
+ String browserContextID = toBrowserContextIDProtocolString(page.sessionID());
Expand Down Expand Up @@ -10354,6 +10358,9 @@ index 0000000000000000000000000000000000000000..2c5e2bc04b51b39ae4f3128c86afb29e
+ if (!m_isEnabled)
+ return;
+
+ if (isInspectorProcessPool(page.process().processPool()))
+ return;
+
+ String browserContextID = toBrowserContextIDProtocolString(page.sessionID());
+ BrowserContext* browserContext = getExistingBrowserContext(browserContextID);
+ browserContext->pages.remove(&page);
Expand Down

0 comments on commit 80cf7e9

Please sign in to comment.