Address review feedback from Darin.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jun 2015 17:27:06 +0000 (17:27 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jun 2015 17:27:06 +0000 (17:27 +0000)
* Shared/mac/HangDetectionDisablerMac.mm:
(WebKit::clientsMayIgnoreEvents):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185753 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/HangDetectionDisablerMac.mm

index 05b112b..793a9d4 100644 (file)
@@ -1,5 +1,12 @@
 2015-06-19  Anders Carlsson  <andersca@apple.com>
 
+        Address review feedback from Darin.
+
+        * Shared/mac/HangDetectionDisablerMac.mm:
+        (WebKit::clientsMayIgnoreEvents):
+
+2015-06-19  Anders Carlsson  <andersca@apple.com>
+
         Disable SpinTracer detection while loading sync XHR
         https://bugs.webkit.org/show_bug.cgi?id=146150
         rdar://problem/21462023
index a5de7f6..a500bf3 100644 (file)
@@ -41,12 +41,7 @@ static bool clientsMayIgnoreEvents()
     if (CGSCopyConnectionProperty(CGSMainConnectionID(), CGSMainConnectionID(), clientsMayIgnoreEventsKey, &valuePtr) != kCGErrorSuccess)
         return false;
 
-    auto value = adoptCF(valuePtr);
-
-    if (!value || CFGetTypeID(value.get()) != CFBooleanGetTypeID())
-        return false;
-
-    return value == kCFBooleanTrue;
+    return adoptCF(valuePtr) == kCFBooleanTrue;
 }
 
 static void setClientsMayIgnoreEvents(bool clientsMayIgnoreEvents)