WebKit Bugzilla
Attachment 341293 Details for
Bug 185983
: [Wi-Fi Assertions] Track whether WiFiAssertionHolder should actually hold a Wi-Fi assertion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185983-20180525092801.patch (text/plain), 13.21 KB, created by
Andy Estes
on 2018-05-25 09:28:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2018-05-25 09:28:02 PDT
Size:
13.21 KB
patch
obsolete
>Subversion Revision: 232160 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index c262a610813c99a44cddcf77a6ebbba7be645ff2..ed7bba46bf3201991111c70c7236443edf6b8192 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,36 @@ >+2018-05-25 Andy Estes <aestes@apple.com> >+ >+ [Wi-Fi Assertions] Track whether WiFiAssertionHolder should actually hold a Wi-Fi assertion >+ https://bugs.webkit.org/show_bug.cgi?id=185983 >+ <rdar://problem/40205486> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/Network-iOS.entitlements: >+ >+ Added a needed entitlement. >+ >+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: >+ * NetworkProcess/cocoa/WiFiAssertionHolder.h: >+ (WebKit::WiFiAssertionHolder::shouldHoldWiFiAssertion const): >+ >+ Track whether WiFiAssertionHolder should actually hold a Wi-Fi assertion. >+ >+ * NetworkProcess/cocoa/WiFiAssertionHolder.mm: Renamed from Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.cpp. >+ (holdWiFiAssertion): >+ (releaseWiFiAssertion): >+ (WebKit::WiFiAssertionHolder::WiFiAssertionHolder): >+ (WebKit::WiFiAssertionHolder::~WiFiAssertionHolder): >+ >+ Changed holdWiFiAssertion() and releaseWiFiAssertion() to take the >+ WiFiAssertionHolder as an argument. >+ >+ * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: >+ >+ Added a needed sandbox extension. >+ >+ * WebKit.xcodeproj/project.pbxproj: >+ > 2018-05-24 Brent Fulgham <bfulgham@apple.com> > > REGRESSION(r230269): ASSERTION FAILED: sendRightCount == 1 at ProcessLauncherMac.mm(218) >diff --git a/Source/WebKit/Configurations/Network-iOS.entitlements b/Source/WebKit/Configurations/Network-iOS.entitlements >index 96c2f9a8a68c1afbcf4dae002d1fa7200fbfe4b4..9867c2db0742c57821faa69b25a13b316087dce2 100644 >--- a/Source/WebKit/Configurations/Network-iOS.entitlements >+++ b/Source/WebKit/Configurations/Network-iOS.entitlements >@@ -2,6 +2,8 @@ > <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> > <plist version="1.0"> > <dict> >+ <key>com.apple.private.ids.link-preferences</key> >+ <true/> > <key>com.apple.wifi.manager-access</key> > <true/> > <key>com.apple.private.accounts.bundleidspoofing</key> >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >index 53b49217e47223066a12b60064bb7439413c22ce..4fcdba42b5a3f1ef9f03852a6c17a3f6aaffc697 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >@@ -74,10 +74,10 @@ public: > uint64_t pageID() const { return m_pageID; }; > > #if ENABLE(WIFI_ASSERTIONS) >- void acquireWiFiAssertion() >+ void maybeHoldWiFiAssertion(bool shouldHoldWiFiAssertion) > { > ASSERT(!m_wiFiAssertionHolder); >- m_wiFiAssertionHolder.emplace(); >+ m_wiFiAssertionHolder.emplace(shouldHoldWiFiAssertion); > } > #endif > >diff --git a/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.cpp b/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.cpp >deleted file mode 100644 >index ef4964c9d57778eea0c92ffb19a91b2b2646f964..0000000000000000000000000000000000000000 >--- a/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.cpp >+++ /dev/null >@@ -1,57 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "WiFiAssertionHolder.h" >- >-#if HAVE(MOBILE_WIFI) >- >-#if USE(APPLE_INTERNAL_SDK) >-#include <WebKitAdditions/WiFiAssertionHolderAdditions.cpp> >-#else >-static void holdWiFiAssertion() >-{ >-} >- >-static void releaseWiFiAssertion() >-{ >-} >-#endif >- >-namespace WebKit { >- >-WiFiAssertionHolder::WiFiAssertionHolder() >-{ >- holdWiFiAssertion(); >-} >- >-WiFiAssertionHolder::~WiFiAssertionHolder() >-{ >- releaseWiFiAssertion(); >-} >- >-} // namespace WebKit >- >-#endif // HAVE(MOBILE_WIFI) >diff --git a/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.h b/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.h >index 208fcdbc59aeeaabfb44f2ad322279376e084ca8..b1935c32ff3c6e98663d633d29ea784ed3c2eae9 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.h >+++ b/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.h >@@ -34,8 +34,13 @@ namespace WebKit { > class WiFiAssertionHolder { > WTF_MAKE_NONCOPYABLE(WiFiAssertionHolder); > public: >- WiFiAssertionHolder(); >+ explicit WiFiAssertionHolder(bool shouldHoldWiFiAssertion); > ~WiFiAssertionHolder(); >+ >+ bool shouldHoldWiFiAssertion() const { return m_shouldHoldWiFiAssertion; } >+ >+private: >+ bool m_shouldHoldWiFiAssertion; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.mm b/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..a6b3379cf87b02ef27557d45ad87059ea337823d >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/cocoa/WiFiAssertionHolder.mm >@@ -0,0 +1,58 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "WiFiAssertionHolder.h" >+ >+#if HAVE(MOBILE_WIFI) >+ >+#if USE(APPLE_INTERNAL_SDK) >+#import <WebKitAdditions/WiFiAssertionHolderAdditions.mm> >+#else >+static void holdWiFiAssertion(const WiFiAssertionHolder&) >+{ >+} >+ >+static void releaseWiFiAssertion(const WiFiAssertionHolder&) >+{ >+} >+#endif >+ >+namespace WebKit { >+ >+WiFiAssertionHolder::WiFiAssertionHolder(bool shouldHoldWiFiAssertion) >+ : m_shouldHoldWiFiAssertion { shouldHoldWiFiAssertion } >+{ >+ holdWiFiAssertion(*this); >+} >+ >+WiFiAssertionHolder::~WiFiAssertionHolder() >+{ >+ releaseWiFiAssertion(*this); >+} >+ >+} // namespace WebKit >+ >+#endif // HAVE(MOBILE_WIFI) >diff --git a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb >index 043d00d73539eba850c35d1fb8f2c54f34dc797e..a3867ede03f713feb1066f07b19edb10c7a2d193 100644 >--- a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb >+++ b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb >@@ -93,4 +93,5 @@ > (global-name "com.apple.lsd.mapdb") > (global-name "com.apple.analyticsd") > (global-name "com.apple.WirelessCoexManager") >- (global-name "com.apple.wifi.manager")) >+ (global-name "com.apple.wifi.manager") >+ (global-name "com.apple.identityservicesd.embedded.auth")) >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index a5ecb334e78deb6ef4e4cd0ce26f50bb6dcfea03..9c01ed2adc87a077ee5ad22f6111c384d1b1ef51 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -1577,7 +1577,7 @@ > A1C512C9190656E500448914 /* WebPreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */; }; > A1D420471DB5578500BB6B0D /* WKContextMenuListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1EA02351DABFF7E0096021F /* WKContextMenuListener.cpp */; }; > A1DAFDDF207E9B16005E8A52 /* WiFiAssertionHolder.h in Headers */ = {isa = PBXBuildFile; fileRef = A1DAFDDD207E9B16005E8A52 /* WiFiAssertionHolder.h */; }; >- A1DAFDE0207E9B16005E8A52 /* WiFiAssertionHolder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.cpp */; }; >+ A1DAFDE0207E9B16005E8A52 /* WiFiAssertionHolder.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.mm */; }; > A1DF631218E0B7C8003A3E2A /* DownloadClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */; }; > A1DF631318E0B7C8003A3E2A /* DownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A1DF631118E0B7C8003A3E2A /* DownloadClient.h */; }; > A1E688701F6E2BAB007006A6 /* QuarantineSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1E6886F1F6E2BAB007006A6 /* QuarantineSPI.h */; }; >@@ -4063,7 +4063,7 @@ > A1C512C6190656E500448914 /* WebPreviewLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPreviewLoaderClient.cpp; path = ios/WebPreviewLoaderClient.cpp; sourceTree = "<group>"; }; > A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPreviewLoaderClient.h; path = ios/WebPreviewLoaderClient.h; sourceTree = "<group>"; }; > A1DAFDDD207E9B16005E8A52 /* WiFiAssertionHolder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WiFiAssertionHolder.h; path = NetworkProcess/cocoa/WiFiAssertionHolder.h; sourceTree = "<group>"; }; >- A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = WiFiAssertionHolder.cpp; path = NetworkProcess/cocoa/WiFiAssertionHolder.cpp; sourceTree = "<group>"; }; >+ A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WiFiAssertionHolder.mm; path = NetworkProcess/cocoa/WiFiAssertionHolder.mm; sourceTree = "<group>"; }; > A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadClient.mm; sourceTree = "<group>"; }; > A1DF631118E0B7C8003A3E2A /* DownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadClient.h; sourceTree = "<group>"; }; > A1E6886F1F6E2BAB007006A6 /* QuarantineSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuarantineSPI.h; sourceTree = "<group>"; }; >@@ -6913,8 +6913,8 @@ > 7EC4F0F918E4A945008056AF /* NetworkProcessCocoa.mm */, > 532159501DBAE6D70054AA3C /* NetworkSessionCocoa.h */, > 5C20CB9B1BB0DCD200895BB1 /* NetworkSessionCocoa.mm */, >- A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.cpp */, > A1DAFDDD207E9B16005E8A52 /* WiFiAssertionHolder.h */, >+ A1DAFDDE207E9B16005E8A52 /* WiFiAssertionHolder.mm */, > ); > name = cocoa; > sourceTree = "<group>"; >@@ -11177,7 +11177,7 @@ > 83EE575B1DB7D61100C74C50 /* WebValidationMessageClient.cpp in Sources */, > 2DFC7DBC1BCCC19500C1548C /* WebViewImpl.mm in Sources */, > C0337DD1127A2980008FF4F4 /* WebWheelEvent.cpp in Sources */, >- A1DAFDE0207E9B16005E8A52 /* WiFiAssertionHolder.cpp in Sources */, >+ A1DAFDE0207E9B16005E8A52 /* WiFiAssertionHolder.mm in Sources */, > 868160D0187645570021E79D /* WindowServerConnection.mm in Sources */, > 29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm in Sources */, > 29232DF818B2A9AE00D0596F /* WKAccessibilityWebPageObjectIOS.mm in Sources */,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185983
: 341293