Source/WebKit2: Add verification scripts to WebKit2 project and fix the issues they...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2011 02:24:24 +0000 (02:24 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2011 02:24:24 +0000 (02:24 +0000)
Reviewed by Sam Weinig.

* Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
library functions from being exported as weak externals.
* Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
* UIProcess/WebPageGroup.cpp:
(WebKit::webPageGroupMap): Ditto.
* WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
Run verification scripts at the appropriate times.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
(WebKit::WebEditorClient::respondToChangedContents): Ditto.
(WebKit::WebEditorClient::respondToChangedSelection): Ditto.
(WebKit::WebEditorClient::didEndEditing): Ditto.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::idToHistoryItemMap): Ditto.
(WebKit::historyItemToIDMap): Ditto.

Tools: Update verification scripts to handle WebKit2.

Reviewed by Sam Weinig.

* Scripts/check-for-global-initializers: Skip object files that use RefCountedLeakChecker.
* Scripts/check-for-inappropriate-files-in-framework: Add some inappropriate file types for
WebKit2.

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

Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/Base.xcconfig
Source/WebKit2/Configurations/WebKit2.xcconfig
Source/WebKit2/Shared/WebContextMenuItem.cpp
Source/WebKit2/UIProcess/WebPageGroup.cpp
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
Tools/ChangeLog
Tools/Scripts/check-for-global-initializers
Tools/Scripts/check-for-inappropriate-files-in-framework

index c4d478f6164f4af9df9cf720a143dfe5e48de42f..fa5974a3ac105584a1ea8cfacc7e3df739a7efd3 100644 (file)
@@ -1,3 +1,27 @@
+2011-03-01  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add verification scripts to WebKit2 project and fix the issues they reveal.
+
+        * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
+        library functions from being exported as weak externals.
+        * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
+        * Shared/WebContextMenuItem.cpp:
+        (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
+        * UIProcess/WebPageGroup.cpp:
+        (WebKit::webPageGroupMap): Ditto.
+        * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
+        Run verification scripts at the appropriate times.
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
+        (WebKit::WebEditorClient::respondToChangedContents): Ditto.
+        (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
+        (WebKit::WebEditorClient::didEndEditing): Ditto.
+        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+        (WebKit::idToHistoryItemMap): Ditto.
+        (WebKit::historyItemToIDMap): Ditto.
+
 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
 
         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
index 4005a47b144ac31741d1c1bcbcc0aba4d6ae2a12..4bf208e6a67e8e6d13fa8074e6fb239c5d6b3c0d 100644 (file)
@@ -51,6 +51,9 @@ VALID_ARCHS = i386 x86_64;
 // FIXME: <rdar://problem/5070292> WebKit should build with -Wshorten-64-to-32
 WARNING_CFLAGS = -Wall -Wextra -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings;
 
+// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
+OTHER_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv;
+
 
 REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME));
 REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx);
index 01771c2f781170449e6cf2fe3e446872f01a173a..aa80bbcab6a92f97239c6c9bd946791944e09db9 100644 (file)
@@ -29,6 +29,6 @@ INFOPLIST_FILE = Info.plist;
 // The framework location specified in mac/MainMac.cpp needs to be kept in sync with the install path.
 INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
 
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME));
+OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME)) $(OTHER_LDFLAGS);
 OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 OTHER_LDFLAGS_macosx_1070 = -Xlinker -objc_gc_compaction;
index a3322bb1115a0e6ea01b92ac6827444deff958e7..f3129975b2eff5e360b34da90bdd1e8c618476c7 100644 (file)
@@ -54,8 +54,8 @@ PassRefPtr<WebContextMenuItem> WebContextMenuItem::create(const String& title, b
 
 WebContextMenuItem* WebContextMenuItem::separatorItem()
 {
-    static RefPtr<WebContextMenuItem> separatorItem = adoptRef(new WebContextMenuItem(WebContextMenuItemData(WebCore::SeparatorType, WebCore::ContextMenuItemTagNoAction, String(), true, false)));
-    return separatorItem.get();
+    DEFINE_STATIC_LOCAL(WebContextMenuItem*, separatorItem, (adoptRef(new WebContextMenuItem(WebContextMenuItemData(WebCore::SeparatorType, WebCore::ContextMenuItemTagNoAction, String(), true, false))).leakRef()));
+    return separatorItem;
 }
 
 PassRefPtr<ImmutableArray> WebContextMenuItem::submenuItemsAsImmutableArray() const
index aa4cfb78c2d05107ec956583645fb2e194203986..f64dd2cb64c4f45f2fd1b1f1dea4caf35d189f89 100644 (file)
@@ -43,7 +43,7 @@ typedef HashMap<uint64_t, WebPageGroup*> WebPageGroupMap;
 
 static WebPageGroupMap& webPageGroupMap()
 {
-    static WebPageGroupMap map;
+    DEFINE_STATIC_LOCAL(WebPageGroupMap, map, ());
     return map;
 }
 
index 11bce927bb111dacb8b7abf8f2cfa6f8d444ced0..5a00a7657464c7a0fb108f02d38c054642ad42f4 100644 (file)
                512E3525130B550600ABD19A /* WebApplicationCacheManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 512E3521130B550100ABD19A /* WebApplicationCacheManagerProxy.h */; };
                512E352E130B55AF00ABD19A /* WebApplicationCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512E352B130B55AF00ABD19A /* WebApplicationCacheManager.cpp */; };
                512E352F130B55AF00ABD19A /* WebApplicationCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 512E352C130B55AF00ABD19A /* WebApplicationCacheManager.h */; };
-               512E3530130B55AF00ABD19A /* WebApplicationCacheManager.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 512E352D130B55AF00ABD19A /* WebApplicationCacheManager.messages.in */; };
                512E356A130B57F000ABD19A /* WebApplicationCacheManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512E3568130B57F000ABD19A /* WebApplicationCacheManagerMessageReceiver.cpp */; };
                512E356B130B57F000ABD19A /* WebApplicationCacheManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 512E3569130B57F000ABD19A /* WebApplicationCacheManagerMessages.h */; };
-               512E35F1130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 512E35F0130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in */; };
                512E35F8130B642E00ABD19A /* WebApplicationCacheManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512E35F6130B642E00ABD19A /* WebApplicationCacheManagerProxyMessageReceiver.cpp */; };
                512E35F9130B642E00ABD19A /* WebApplicationCacheManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 512E35F7130B642E00ABD19A /* WebApplicationCacheManagerProxyMessages.h */; };
                512F588A12A8836600629530 /* AuthenticationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512F588712A8836600629530 /* AuthenticationManager.cpp */; };
                512F588B12A8836600629530 /* AuthenticationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 512F588812A8836600629530 /* AuthenticationManager.h */; };
-               512F588C12A8836600629530 /* AuthenticationManager.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 512F588912A8836600629530 /* AuthenticationManager.messages.in */; };
                512F589612A8838800629530 /* AuthenticationChallengeProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512F588E12A8838800629530 /* AuthenticationChallengeProxy.cpp */; };
                512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 512F588F12A8838800629530 /* AuthenticationChallengeProxy.h */; };
                512F589812A8838800629530 /* AuthenticationDecisionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512F589012A8838800629530 /* AuthenticationDecisionListener.cpp */; };
                51A84CE3127F386B00CA6EA4 /* WebContextMenuProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A84CE2127F386B00CA6EA4 /* WebContextMenuProxy.cpp */; };
                51A9E0FF1315CCDE009E7031 /* WebKeyValueStorageManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A9E0FC1315CCDE009E7031 /* WebKeyValueStorageManager.cpp */; };
                51A9E1001315CCDE009E7031 /* WebKeyValueStorageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A9E0FD1315CCDE009E7031 /* WebKeyValueStorageManager.h */; };
-               51A9E1011315CCDE009E7031 /* WebKeyValueStorageManager.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 51A9E0FE1315CCDE009E7031 /* WebKeyValueStorageManager.messages.in */; };
                51A9E1051315CCFC009E7031 /* WebKeyValueStorageManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A9E1021315CCFC009E7031 /* WebKeyValueStorageManagerProxy.cpp */; };
                51A9E1061315CCFC009E7031 /* WebKeyValueStorageManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A9E1031315CCFC009E7031 /* WebKeyValueStorageManagerProxy.h */; };
-               51A9E1071315CCFC009E7031 /* WebKeyValueStorageManagerProxy.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 51A9E1041315CCFC009E7031 /* WebKeyValueStorageManagerProxy.messages.in */; };
                51A9E10A1315CD18009E7031 /* WKKeyValueStorageManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A9E1081315CD18009E7031 /* WKKeyValueStorageManager.cpp */; };
                51A9E10B1315CD18009E7031 /* WKKeyValueStorageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A9E1091315CD18009E7031 /* WKKeyValueStorageManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
                51A9E1281315ED35009E7031 /* WebKeyValueStorageManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A9E1241315ED35009E7031 /* WebKeyValueStorageManagerMessageReceiver.cpp */; };
                                8DC2EF520486A6940098B216 /* Resources */,
                                8DC2EF540486A6940098B216 /* Sources */,
                                8DC2EF560486A6940098B216 /* Frameworks */,
+                               5DF408C0131DD37C00130071 /* Check For Global Initializers */,
+                               5DF408C4131DD3DB00130071 /* Check For Exit Time Destructors */,
+                               5DF408C5131DD46700130071 /* Check For Weak VTables and Externals */,
+                               5DF408C6131DD49700130071 /* Check For Framework Include Consistency */,
+                               5DF408D1131DDBEC00130071 /* Check For Inappropriate Files In Framework */,
                        );
                        buildRules = (
                        );
                        buildActionMask = 2147483647;
                        files = (
                                8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
-                               512F588C12A8836600629530 /* AuthenticationManager.messages.in in Resources */,
-                               512E3530130B55AF00ABD19A /* WebApplicationCacheManager.messages.in in Resources */,
-                               512E35F1130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in in Resources */,
-                               51A9E1011315CCDE009E7031 /* WebKeyValueStorageManager.messages.in in Resources */,
-                               51A9E1071315CCFC009E7031 /* WebKeyValueStorageManagerProxy.messages.in in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+               5DF408C0131DD37C00130071 /* Check For Global Initializers */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
+                       );
+                       name = "Check For Global Initializers";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-global-initializers ]; then\n    ../../Tools/Scripts/check-for-global-initializers || exit $?\nfi";
+               };
+               5DF408C4131DD3DB00130071 /* Check For Exit Time Destructors */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
+                       );
+                       name = "Check For Exit Time Destructors";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-exit-time-destructors ]; then\n    ../../Tools/Scripts/check-for-exit-time-destructors || exit $?\nfi";
+               };
+               5DF408C5131DD46700130071 /* Check For Weak VTables and Externals */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
+                       );
+                       name = "Check For Weak VTables and Externals";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-weak-vtables-and-externals ]; then\n    ../../Tools/Scripts/check-for-weak-vtables-and-externals || exit $?\nfi";
+               };
+               5DF408C6131DD49700130071 /* Check For Framework Include Consistency */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Check For Framework Include Consistency";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-webkit-framework-include-consistency ]; then\n    ../../Tools/Scripts/check-for-webkit-framework-include-consistency || exit $?\nfi\n";
+               };
+               5DF408D1131DDBEC00130071 /* Check For Inappropriate Files In Framework */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Check For Inappropriate Files In Framework";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-files-in-framework ]; then\n    ../../Tools/Scripts/check-for-inappropriate-files-in-framework || exit $?\nfi\n";
+               };
                C0CE72841247E66800BC0EC4 /* Generate Derived Sources */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
index 2395fa3ab49a2d630b7976f968149f7966dfca50..b95428359133780b4ced60bf63d95a36b9de150c 100644 (file)
@@ -169,21 +169,21 @@ bool WebEditorClient::shouldMoveRangeAfterDelete(Range*, Range*)
 void WebEditorClient::didBeginEditing()
 {
     // FIXME: What good is a notification name, if it's always the same?
-    static const String WebViewDidBeginEditingNotification = "WebViewDidBeginEditingNotification";
+    DEFINE_STATIC_LOCAL(String, WebViewDidBeginEditingNotification, ("WebViewDidBeginEditingNotification"));
     m_page->injectedBundleEditorClient().didBeginEditing(m_page, WebViewDidBeginEditingNotification.impl());
     notImplemented();
 }
 
 void WebEditorClient::respondToChangedContents()
 {
-    static const String WebViewDidChangeNotification = "WebViewDidChangeNotification";
+    DEFINE_STATIC_LOCAL(String, WebViewDidChangeNotification, ("WebViewDidChangeNotification"));
     m_page->injectedBundleEditorClient().didChange(m_page, WebViewDidChangeNotification.impl());
     notImplemented();
 }
 
 void WebEditorClient::respondToChangedSelection()
 {
-    static const String WebViewDidChangeSelectionNotification = "WebViewDidChangeSelectionNotification";
+    DEFINE_STATIC_LOCAL(String, WebViewDidChangeSelectionNotification, ("WebViewDidChangeSelectionNotification"));
     m_page->injectedBundleEditorClient().didChangeSelection(m_page, WebViewDidChangeSelectionNotification.impl());
     Frame* frame = m_page->corePage()->focusController()->focusedFrame();
     if (!frame)
@@ -213,7 +213,7 @@ void WebEditorClient::respondToChangedSelection()
     
 void WebEditorClient::didEndEditing()
 {
-    static const String WebViewDidEndEditingNotification = "WebViewDidEndEditingNotification";
+    DEFINE_STATIC_LOCAL(String, WebViewDidEndEditingNotification, ("WebViewDidEndEditingNotification"));
     m_page->injectedBundleEditorClient().didEndEditing(m_page, WebViewDidEndEditingNotification.impl());
     notImplemented();
 }
index 39df1c6c863888e180b22cb6df8a31de72abbc5c..02688c596139432569ff3a01926873d6aafe5332 100644 (file)
@@ -51,13 +51,13 @@ typedef HashMap<RefPtr<HistoryItem>, uint64_t> HistoryItemToIDMap;
 
 static IDToHistoryItemMap& idToHistoryItemMap()
 {
-    static IDToHistoryItemMap map;
+    DEFINE_STATIC_LOCAL(IDToHistoryItemMap, map, ());
     return map;
 } 
 
 static HistoryItemToIDMap& historyItemToIDMap()
 {
-    static HistoryItemToIDMap map;
+    DEFINE_STATIC_LOCAL(HistoryItemToIDMap, map, ());
     return map;
 } 
 
index e01268a0295fb50c9ec5fe89234d9ce453cbf67f..7ff5a8bbf0da59bb77c50058852c08f42f15e11d 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-01  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Update verification scripts to handle WebKit2.
+
+        * Scripts/check-for-global-initializers: Skip object files that use RefCountedLeakChecker.
+        * Scripts/check-for-inappropriate-files-in-framework: Add some inappropriate file types for
+        WebKit2.
+
 2011-03-01  Daniel Cheng  <dcheng@chromium.org>
 
         Reviewed by David Levin.
index 102fa0982cde6202908c4c529c67528efb5a3b3b..7f9057748a76c6ba4102c7637a68da88f0ce5f60 100755 (executable)
@@ -124,6 +124,12 @@ for my $file (sort @files) {
                 next if $shortName eq "HostedNetscapePluginStream.o";
                 next if $shortName eq "NetscapePluginInstanceProxy.o";
             }
+            if ($target eq "WebKit2") {
+                next if $shortName eq "WebContext.o";
+                next if $shortName eq "WebFrame.o";
+                next if $shortName eq "WebPage.o";
+                next if $shortName eq "WebPageProxy.o";
+            }
         }
 
         print "ERROR: $shortName has one or more global initializers in it! ($file), near @globals\n";
index 1ab71b222eb051c94d7e99070236cfd06d3017b0..41e7c84f7c6f7791f31c8d617843fa9a3f8b265e 100755 (executable)
@@ -27,7 +27,9 @@ base_directory = ENV['TARGET_BUILD_DIR'] or throw "Unable to find TARGET_BUILD_D
 project_name = ENV['PROJECT_NAME'] or throw "Unable to find PROJECT_NAME in the environment!"
 is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || "NO").upcase == "YES"
 
-$INAPPROPRIATE_FILES = { "WebCore" => { "Resources" => ["*.css", "*.in", "*.idl", "*.h"] } }
+$INAPPROPRIATE_FILES = { "WebCore" => { "Resources" => ["*.css", "*.in", "*.idl", "*.h"] },
+                         "WebKit2" => { "Resources" => ["*.in", "*.h"] },
+                       }
 
 Dir.chdir base_directory