Bug 116018

Summary: [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
Product: WebKit Reporter: Zoltan Arvai <zarvai>
Component: New BugsAssignee: Andras Becsi <abecsi>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, andersca, jturcotte, sam, zeno
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 115891    
Attachments:
Description Flags
Patch none

Description Zoltan Arvai 2013-05-13 02:27:20 PDT
New file Shared/Plugins/Netscape/PluginInformation.cpp landed in http://trac.webkit.org/changeset/149904 includes WebKit2/UIProcess/Plugins/PluginInfoStore.h and refers to it in line 103 with:
 map.set(pluginInformationDefaultLoadPolicyKey(), WebUInt64::create(toWKPluginLoadPolicy(PluginInfoStore::policyForPlugin(plugin))));

If NETSCAPE_PLUGIN_API is not enabled, then the build will fail, because ENABLE(NETSCAPE_PLUGIN_API) guarded in PluginInfoStore.h but not in PluginInformation.cpp. 

It seems that happened on Qt Mountain Lion bot:

/Users/admin/work/WebKit-BuildSlave/qt-mountainlion-release/build/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp:103:93: error: use of undeclared identifier 'PluginInfoStore'
    map.set(pluginInformationDefaultLoadPolicyKey(), WebUInt64::create(toWKPluginLoadPolicy(PluginInfoStore::policyForPlugin(plugin))));
Comment 1 Andras Becsi 2013-05-15 05:43:12 PDT
Created attachment 201821 [details]
Patch
Comment 2 Jocelyn Turcotte 2013-05-15 07:32:07 PDT
Comment on attachment 201821 [details]
Patch

Ideally it feels like the whole file and its header should also be guarded, but WebPageProxy::didFailToInitializePlugin is one use that would difficult to wrap.
So I guess it's fine to guard it that way, LGTM.
Comment 3 Andras Becsi 2013-05-16 01:45:50 PDT
Committed r150178: <http://trac.webkit.org/changeset/150178>