WebContextEfl.cpp and WebContextGTK.cpp contains similar static functions to initialize InspectorServer (initializeInspectorServer() vs initInspectorServer()). Create a common method called from both places.
Created attachment 228423 [details] Patch
Comment on attachment 228423 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228423&action=review Sorry for the late review. Thanks for this nice cleanup. > Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp:41 > +#if PLATFORM(GTK) || PLATFORM(EFL) This should be #if ENABLE(INSPECTOR_SERVER). INSPECTOR_SERVER is only used by GTK and EFL. > Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h:45 > +#if PLATFORM(GTK) || PLATFORM(EFL) Ditto. > Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h:69 > + static bool initialized; You'll want to split this out: #if PLATFORM(GTK) || PLATFORM(EFL) void buildPageList(Vector<char>& data, String& contentType); #endif #if ENABLE(INSPECTOR_SERVER) static bool initialized; #endif The extra #ifdef is messier here, but I think it's better to use the feature-specific rather than platform-specific conditionals where possible.