Try to fix the Yosemite build again.
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 19:45:11 +0000 (19:45 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 19:45:11 +0000 (19:45 +0000)
* UIProcess/API/Cocoa/WKUserScript.mm:
(toStringVector):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm

index 619eed9..cdd6872 100644 (file)
@@ -1,5 +1,13 @@
 2016-02-26  Sam Weinig  <sam@webkit.org>
 
+        Try to fix the Yosemite build again.
+
+        * UIProcess/API/Cocoa/WKUserScript.mm:
+        (toStringVector):
+        (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
+
+2016-02-26  Sam Weinig  <sam@webkit.org>
+
         Try to fix the Yosemite build.
 
         * UIProcess/API/Cocoa/WKUserScriptPrivate.h:
index 386d268..a7dbf19 100644 (file)
@@ -73,7 +73,7 @@
 
 @implementation WKUserScript (WKPrivate)
 
-static Vector<WTF::String> toStringVector(NSArray<NSString *> *input)
+static Vector<WTF::String> toStringVector(NSArray *input)
 {
     Vector<WTF::String> vector;
 
@@ -82,12 +82,14 @@ static Vector<WTF::String> toStringVector(NSArray<NSString *> *input)
         return vector;
 
     vector.reserveInitialCapacity(size);
-    for (NSString *string : input)
-        vector.uncheckedAppend(string);
+    for (id string : input) {
+        if ([string isKindOfClass:[NSString class]])
+            vector.uncheckedAppend(string);
+    }
     return vector;
 }
 
-- (instancetype)_initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly legacyWhitelist:(NSArray<NSString *> *)legacyWhitelist legacyBlacklist:(NSArray<NSString *> *)legacyBlacklist userContentWorld:(_WKUserContentWorld *)userContentWorld
+- (instancetype)_initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly legacyWhitelist:(NSArray *)legacyWhitelist legacyBlacklist:(NSArray *)legacyBlacklist userContentWorld:(_WKUserContentWorld *)userContentWorld
 {
     if (!(self = [super init]))
         return nil;