diff --git a/layout/build/nsLayoutFactory.cpp b/layout/build/nsLayoutFactory.cpp index b99978e3a37b..efec614f8bd5 100644 --- a/layout/build/nsLayoutFactory.cpp +++ b/layout/build/nsLayoutFactory.cpp @@ -59,6 +59,7 @@ #include "nsIBindingManager.h" #include "nsIAutoCopy.h" +#include "nsContentPolicyUtils.h" #include "nsIXIFConverter.h" #include "nsINodeInfo.h" @@ -106,6 +107,7 @@ static NS_DEFINE_CID(kBindingManagerCID, NS_BINDINGMANAGER_CID); static NS_DEFINE_CID(kDOMImplementationCID, NS_DOM_IMPLEMENTATION_CID); static NS_DEFINE_CID(kNodeInfoManagerCID, NS_NODEINFOMANAGER_CID); static NS_DEFINE_CID(kAutoCopyServiceCID, NS_AUTOCOPYSERVICE_CID); +static NS_DEFINE_CID(kContentPolicyCID, NS_CONTENTPOLICY_CID); static NS_DEFINE_CID(kXIFConverterCID, NS_XIFCONVERTER_CID); @@ -135,6 +137,7 @@ extern nsresult NS_NewBindingManager(nsIBindingManager** aResult); extern nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult); extern nsresult NS_NewAutoCopyService(nsIAutoCopyService** aResult); +extern nsresult NS_NewContentPolicy(nsIContentPolicy** aResult); extern nsresult NS_NewXIFConverter(nsIXIFConverter** aResult); @@ -424,10 +427,17 @@ nsLayoutFactory::CreateInstance(nsISupports *aOuter, } else if (mClassID.Equals(kDOMImplementationCID)) { res = NS_NewDOMImplementation((nsIDOMDOMImplementation**) &inst); - if (NS_FAILED(res)) { + if (NS_FAILED(res)) { LOG_NEW_FAILURE("NS_NewDOMImplementation", res); return res; - } + } + } + else if (mClassID.Equals(kContentPolicyCID)) { + res = NS_NewContentPolicy((nsIContentPolicy**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewContentPolicy", res); + return res; + } } else { return NS_NOINTERFACE; diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index fbe5d373f9f9..63a251bf69fd 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -67,6 +67,7 @@ #include "nsTextTransformer.h" #include "nsIHTTPProtocolHandler.h" #include "gbdate.h" +#include "nsContentPolicyUtils.h" #define PRODUCT_NAME "Gecko" static NS_DEFINE_CID(kHTTPHandlerCID, NS_IHTTPHANDLER_CID); @@ -357,8 +358,8 @@ static Components gComponents[] = { { "XBL Binding Manager", NS_BINDINGMANAGER_CID, "component://netscape/xbl/binding-manager" }, { "AutoCopy Service", NS_AUTOCOPYSERVICE_CID, "component://netscape/autocopy" }, + { "Content policy service", NS_CONTENTPOLICY_CID, NS_CONTENTPOLICY_PROGID }, { "XIF Converter", NS_XIFCONVERTER_CID, nsnull }, - { "NodeInfoManager", NS_NODEINFOMANAGER_CID, NS_NODEINFOMANAGER_PROGID } }; #define NUM_COMPONENTS (sizeof(gComponents) / sizeof(gComponents[0]))