2009-12-07 Gyuyoung Kim <gyuyoung@gmail.com>
[WebKit-https.git] / WebKit / gtk / webkit / webkitwebinspector.cpp
index 68b03b21e09b662706886de8853b77f5ae7b2be7..2feb0644a73e111f41ac589dbc1206d6c918f46d 100644 (file)
@@ -346,12 +346,16 @@ static void webkit_web_inspector_set_property(GObject* object, guint prop_id, co
 
     switch(prop_id) {
     case PROP_JAVASCRIPT_PROFILING_ENABLED: {
+#if ENABLE(JAVASCRIPT_DEBUGGER)
         bool enabled = g_value_get_boolean(value);
         WebCore::InspectorController* controller = priv->page->inspectorController();
         if (enabled)
             controller->enableProfiler();
         else
             controller->disableProfiler();
+#else
+        g_message("PROP_JAVASCRIPT_PROFILING_ENABLED is not work because of the javascript debugger is disabled\n");
+#endif
         break;
     }
     case PROP_TIMELINE_PROFILING_ENABLED: {
@@ -382,7 +386,11 @@ static void webkit_web_inspector_get_property(GObject* object, guint prop_id, GV
         g_value_set_string(value, priv->inspected_uri);
         break;
     case PROP_JAVASCRIPT_PROFILING_ENABLED:
+#if ENABLE(JAVASCRIPT_DEBUGGER)
         g_value_set_boolean(value, priv->page->inspectorController()->profilerEnabled());
+#else
+        g_message("PROP_JAVASCRIPT_PROFILING_ENABLED is not work because of the javascript debugger is disabled\n");
+#endif
         break;
     case PROP_TIMELINE_PROFILING_ENABLED:
         g_value_set_boolean(value, priv->page->inspectorController()->timelineAgent() != 0);