Title: [150986] branches/safari-537.43-branch/Source/WebCore

Diff

Modified: branches/safari-537.43-branch/Source/WebCore/ChangeLog (150985 => 150986)


--- branches/safari-537.43-branch/Source/WebCore/ChangeLog	2013-05-30 21:15:46 UTC (rev 150985)
+++ branches/safari-537.43-branch/Source/WebCore/ChangeLog	2013-05-30 21:18:14 UTC (rev 150986)
@@ -1,5 +1,28 @@
 2013-05-30  Lucas Forschler  <[email protected]>
 
+        Merge r150977
+
+    2013-05-30  Anders Carlsson  <[email protected]>
+
+            REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
+            https://bugs.webkit.org/show_bug.cgi?id=117042
+            <rdar://problem/13916291>
+
+            Reviewed by Mark Rowe.
+
+            Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
+            Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
+            whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
+
+            * loader/cache/CachedScript.cpp:
+            (WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
+            * loader/cache/CachedScript.h:
+            * platform/RuntimeApplicationChecks.cpp:
+            (WebCore::applicationIsSolidStateNetworksDownloader):
+            * platform/RuntimeApplicationChecks.h:
+
+2013-05-30  Lucas Forschler  <[email protected]>
+
         Rollout r150819
 
 2013-05-30  Lucas Forschler  <[email protected]>

Modified: branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.cpp (150985 => 150986)


--- branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.cpp	2013-05-30 21:15:46 UTC (rev 150985)
+++ branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.cpp	2013-05-30 21:18:14 UTC (rev 150986)
@@ -33,6 +33,7 @@
 #include "MIMETypeRegistry.h"
 #include "MemoryCache.h"
 #include "ResourceBuffer.h"
+#include "RuntimeApplicationChecks.h"
 #include "TextResourceDecoder.h"
 #include <wtf/Vector.h>
 
@@ -107,4 +108,18 @@
 }
 #endif
 
+bool CachedScript::shouldIgnoreHTTPStatusCodeErrors() const
+{
+    // This is a workaround for <rdar://problem/13916291>
+    // REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing
+    // of a load event and needs an app-specific hack for compatibility.
+    // The installer in question tries to load .js file that doesn't exist, causing the server to
+    // return a 404 response. Normally, this would trigger an error event to be dispatched, but the
+    // installer expects a load event instead so we work around it here.
+    if (applicationIsSolidStateNetworksDownloader())
+        return true;
+
+    return CachedResource::shouldIgnoreHTTPStatusCodeErrors();
+}
+
 } // namespace WebCore

Modified: branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.h (150985 => 150986)


--- branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.h	2013-05-30 21:15:46 UTC (rev 150985)
+++ branches/safari-537.43-branch/Source/WebCore/loader/cache/CachedScript.h	2013-05-30 21:18:14 UTC (rev 150986)
@@ -54,6 +54,8 @@
         virtual PurgePriority purgePriority() const { return PurgeLast; }
         virtual bool mayTryReplaceEncodedData() const OVERRIDE { return true; }
 
+        virtual bool shouldIgnoreHTTPStatusCodeErrors() const OVERRIDE;
+
         String m_script;
         RefPtr<TextResourceDecoder> m_decoder;
     };

Modified: branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.cpp (150985 => 150986)


--- branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.cpp	2013-05-30 21:15:46 UTC (rev 150985)
+++ branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.cpp	2013-05-30 21:18:14 UTC (rev 150986)
@@ -108,4 +108,10 @@
     return isVersions;
 }
 
+bool applicationIsSolidStateNetworksDownloader()
+{
+    static bool isSolidStateNetworksDownloader = mainBundleIsEqualTo("com.solidstatenetworks.awkhost");
+    return isSolidStateNetworksDownloader;
+}
+
 } // namespace WebCore

Modified: branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (150985 => 150986)


--- branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2013-05-30 21:15:46 UTC (rev 150985)
+++ branches/safari-537.43-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2013-05-30 21:18:14 UTC (rev 150986)
@@ -36,6 +36,7 @@
 bool applicationIsMicrosoftMyDay();
 bool applicationIsMicrosoftOutlook();
 bool applicationIsSafari();
+bool applicationIsSolidStateNetworksDownloader();
 bool applicationIsVersions();
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to