2011-01-12 Daniel Bates <dbates@rim.com>
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2011 23:27:30 +0000 (23:27 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2011 23:27:30 +0000 (23:27 +0000)
            And Benjamin C Meyer  <bmeyer@rim.com>

        Build fix when building with Inspector disabled
        https://bugs.webkit.org/show_bug.cgi?id=52313

        After changeset 75604 <http://trac.webkit.org/changeset/75604> it's not
        possible to build when the Inspector is disabled.

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::updateApplicationCacheStatus): Fix build breakage when building
        with Inspector disabled and Offline Web Applications enabled by moving macro guard condition
        ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS) into function body. This makes us also
        consistent with the form we use for InspectorInstrumentation::networkStateChanged() and other
        InspectorInstrumentation functions.
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::didReceiveData): Fix build breakage when building with Inspector
        disabled by adding ENABLE(INSPECTOR) guard around code that references the instance variable
        ApplicationCacheGroup::m_currentResourceIdentifier as this variable only exists when building
        with the Inspector.
        (WebCore::ApplicationCacheGroup::didFinishLoading): Ditto.
        (WebCore::ApplicationCacheGroup::didFail): Ditto.

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp

index bc2921b7130603b4e27f69f95500d6c4ee2ffe05..20271ad7c5566db74b02e46b9ce1a6a0f3be9e8a 100644 (file)
@@ -1,3 +1,26 @@
+2011-01-12  Daniel Bates  <dbates@rim.com>
+            And Benjamin C Meyer  <bmeyer@rim.com>
+
+        Build fix when building with Inspector disabled
+        https://bugs.webkit.org/show_bug.cgi?id=52313
+
+        After changeset 75604 <http://trac.webkit.org/changeset/75604> it's not
+        possible to build when the Inspector is disabled.
+
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::updateApplicationCacheStatus): Fix build breakage when building
+        with Inspector disabled and Offline Web Applications enabled by moving macro guard condition
+        ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS) into function body. This makes us also
+        consistent with the form we use for InspectorInstrumentation::networkStateChanged() and other
+        InspectorInstrumentation functions.
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::didReceiveData): Fix build breakage when building with Inspector
+        disabled by adding ENABLE(INSPECTOR) guard around code that references the instance variable
+        ApplicationCacheGroup::m_currentResourceIdentifier as this variable only exists when building
+        with the Inspector.
+        (WebCore::ApplicationCacheGroup::didFinishLoading): Ditto.
+        (WebCore::ApplicationCacheGroup::didFail): Ditto.
+
 2011-01-12  Chris Marrin  <cmarrin@apple.com>
 
         Unreviewed.
 2011-01-12  Chris Marrin  <cmarrin@apple.com>
 
         Unreviewed.
index 3b86b192fb433c436f78685e46bf7c50a5df58d8..a03779447cd01856f7df35fa1e3e838ca5e83142 100644 (file)
@@ -117,9 +117,7 @@ public:
     static void didCloseWebSocket(ScriptExecutionContext*, unsigned long identifier);
 #endif
     static void networkStateChanged(Page*);
     static void didCloseWebSocket(ScriptExecutionContext*, unsigned long identifier);
 #endif
     static void networkStateChanged(Page*);
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     static void updateApplicationCacheStatus(Frame*);
     static void updateApplicationCacheStatus(Frame*);
-#endif
 #if ENABLE(INSPECTOR)
     static void frontendCreated() { s_frontendCounter += 1; }
     static void frontendDeleted() { s_frontendCounter -= 1; }
 #if ENABLE(INSPECTOR)
     static void frontendCreated() { s_frontendCounter += 1; }
     static void frontendDeleted() { s_frontendCounter -= 1; }
@@ -626,13 +624,13 @@ inline void InspectorInstrumentation::networkStateChanged(Page* page)
 #endif
 }
 
 #endif
 }
 
-#if ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS)
 inline void InspectorInstrumentation::updateApplicationCacheStatus(Frame* frame)
 {
 inline void InspectorInstrumentation::updateApplicationCacheStatus(Frame* frame)
 {
+#if ENABLE(INSPECTOR) && ENABLE(OFFLINE_WEB_APPLICATIONS)
     if (InspectorController* inspectorController = inspectorControllerForFrame(frame))
         updateApplicationCacheStatusImpl(inspectorController, frame);
     if (InspectorController* inspectorController = inspectorControllerForFrame(frame))
         updateApplicationCacheStatusImpl(inspectorController, frame);
-}
 #endif
 #endif
+}
 
 #if ENABLE(INSPECTOR)
 inline InspectorController* InspectorInstrumentation::inspectorControllerForContext(ScriptExecutionContext* context)
 
 #if ENABLE(INSPECTOR)
 inline InspectorController* InspectorInstrumentation::inspectorControllerForContext(ScriptExecutionContext* context)
index 859563879be0a29ad5e6ee3e8619492b14924fde..514ef197aad802dd0213f96da8e4282b1172e6d1 100644 (file)
@@ -555,7 +555,9 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
 
 void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* data, int length, int lengthReceived)
 {
 
 void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* data, int length, int lengthReceived)
 {
+#if ENABLE(INSPECTOR)
     InspectorInstrumentation::didReceiveContentLength(m_frame, m_currentResourceIdentifier, lengthReceived);
     InspectorInstrumentation::didReceiveContentLength(m_frame, m_currentResourceIdentifier, lengthReceived);
+#endif
 
     if (handle == m_manifestHandle) {
         didReceiveManifestData(data, length);
 
     if (handle == m_manifestHandle) {
         didReceiveManifestData(data, length);
@@ -572,7 +574,9 @@ void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* d
 
 void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double finishTime)
 {
 
 void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double finishTime)
 {
+#if ENABLE(INSPECTOR)
     InspectorInstrumentation::didFinishLoading(m_frame, m_currentResourceIdentifier, finishTime);
     InspectorInstrumentation::didFinishLoading(m_frame, m_currentResourceIdentifier, finishTime);
+#endif
 
     if (handle == m_manifestHandle) {
         didFinishLoadingManifest();
 
     if (handle == m_manifestHandle) {
         didFinishLoadingManifest();
@@ -611,7 +615,9 @@ void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double fini
 
 void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& error)
 {
 
 void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& error)
 {
+#if ENABLE(INSPECTOR)
     InspectorInstrumentation::didFailLoading(m_frame, m_currentResourceIdentifier, error);
     InspectorInstrumentation::didFailLoading(m_frame, m_currentResourceIdentifier, error);
+#endif
 
     if (handle == m_manifestHandle) {
         cacheUpdateFailed();
 
     if (handle == m_manifestHandle) {
         cacheUpdateFailed();