@@ -1315,6 +1315,35 @@ index a256d2f8a42548c42ae3c955d9502cc0ad893d91..7e30dfcec151304b21b39286a841e38e
1315
1315
return false;
1316
1316
}
1317
1317
1318
+ diff --git a/Source/WebCore/PAL/pal/SessionID.cpp b/Source/WebCore/PAL/pal/SessionID.cpp
1319
+ index 6b30b4a06bab48ca69e4955e52cb4162bb20780f..ea94293a0bb15b4dd1aa85706f97030f4fe50de1 100644
1320
+ --- a/Source/WebCore/PAL/pal/SessionID.cpp
1321
+ +++ b/Source/WebCore/PAL/pal/SessionID.cpp
1322
+ @@ -27,11 +27,11 @@
1323
+ #include "SessionID.h"
1324
+
1325
+ #include <wtf/MainThread.h>
1326
+ +#include <wtf/CryptographicallyRandomNumber.h>
1327
+
1328
+ namespace PAL {
1329
+
1330
+ static uint64_t currentPersistentID = SessionID::DefaultSessionID;
1331
+ -static uint64_t currentEphemeralID = SessionID::LegacyPrivateSessionID;
1332
+ static bool generationProtectionEnabled;
1333
+
1334
+ SessionID SessionID::generatePersistentSessionID()
1335
+ @@ -47,7 +47,10 @@ SessionID SessionID::generateEphemeralSessionID()
1336
+ ASSERT(isMainThread());
1337
+ RELEASE_ASSERT(!generationProtectionEnabled);
1338
+
1339
+ - return SessionID(++currentEphemeralID);
1340
+ + uint64_t sessionId;
1341
+ + cryptographicallyRandomValues(&sessionId, sizeof(sessionId));
1342
+ + sessionId = sessionId | SessionConstants::EphemeralSessionMask;
1343
+ + return SessionID(sessionId);
1344
+ }
1345
+
1346
+ void SessionID::enableGenerationProtection()
1318
1347
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
1319
1348
index 4de75df8df0b8f90e5b258157eada4a69d3b5916..51dc93bc25fdba7a971b3fdd4f1f380f5d6b48c5 100644
1320
1349
--- a/Source/WebCore/SourcesCocoa.txt
@@ -5681,7 +5710,7 @@ index 0000000000000000000000000000000000000000..b64d1a6d54ec15a99164294706543cee
5681
5710
+
5682
5711
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKBrowserInspector.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKBrowserInspector.mm
5683
5712
new file mode 100644
5684
- index 0000000000000000000000000000000000000000..2db4356a7b26d91e50a8bb73b5b0d9d2b231c1cb
5713
+ index 0000000000000000000000000000000000000000..f31834b80328fc5c182c64de53ff51e4065c62a9
5685
5714
--- /dev/null
5686
5715
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKBrowserInspector.mm
5687
5716
@@ -0,0 +1,52 @@
@@ -5716,7 +5745,7 @@ index 0000000000000000000000000000000000000000..2db4356a7b26d91e50a8bb73b5b0d9d2
5716
5745
+#include "BrowserInspectorPipe.h"
5717
5746
+#include "InspectorBrowserAgentClientMac.h"
5718
5747
+#include "PageClientImplMac.h"
5719
- +#include "WebsiteDataStore .h"
5748
+ +#include "WebKit2Initialize .h"
5720
5749
+
5721
5750
+#import "WKWebView.h"
5722
5751
+
@@ -5727,7 +5756,7 @@ index 0000000000000000000000000000000000000000..2db4356a7b26d91e50a8bb73b5b0d9d2
5727
5756
++ (void)initializeRemoteInspectorPipe:(id<_WKBrowserInspectorDelegate>)delegate headless:(BOOL)headless
5728
5757
+{
5729
5758
+#if ENABLE(REMOTE_INSPECTOR)
5730
- + WebsiteDataStore::defaultDataStore ();
5759
+ + InitializeWebKit2 ();
5731
5760
+ PageClientImpl::setHeadless(headless);
5732
5761
+ initializeBrowserInspectorPipe(makeUnique<InspectorBrowserAgentClientMac>(delegate));
5733
5762
+#endif
0 commit comments