Bug 1174982 - Add the new nsContentPolicyType values to the DBSchema.cpp static_assert; r=bkelly
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Jun 2015 21:51:51 -0400
changeset 249129 593ac5424b6e98e4d4cf10fda8a11e78d212a422
parent 249128 41142f760914e985075456d04e37e984cb8603d2
child 249130 c921bf16ff1016dfb20046a13c78f40e9340e309
push id28918
push userryanvm@gmail.com
push dateTue, 16 Jun 2015 18:38:57 +0000
treeherdermozilla-central@27caa5299f9f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1174982
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1174982 - Add the new nsContentPolicyType values to the DBSchema.cpp static_assert; r=bkelly Added a comment to nsIContentPolicyBase.idl since even I forgot to do this.
dom/base/nsIContentPolicyBase.idl
dom/cache/DBSchema.cpp
--- a/dom/base/nsIContentPolicyBase.idl
+++ b/dom/base/nsIContentPolicyBase.idl
@@ -254,18 +254,19 @@ interface nsIContentPolicyBase : nsISupp
    * Indicates an internal constant for content loaded from track elements.
    *
    * This will be mapped to TYPE_MEDIA.
    */
   const nsContentPolicyType TYPE_INTERNAL_TRACK = 32;
 
   /* When adding new content types, please update nsContentBlocker,
    * NS_CP_ContentTypeName, nsCSPContext, all nsIContentPolicy
-   * implementations, and other things that are not listed here that are
-   * related to nsIContentPolicy. */
+   * implementations, the static_assert in dom/cache/DBSchema.cpp,
+   * and other things that are not listed here that are related to
+   * nsIContentPolicy. */
 
   //////////////////////////////////////////////////////////////////////
 
   /**
    * Returned from shouldLoad or shouldProcess if the load or process request
    * is rejected based on details of the request.
    */
   const short REJECT_REQUEST = -1;
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -123,17 +123,28 @@ static_assert(nsIContentPolicy::TYPE_INV
               nsIContentPolicy::TYPE_DTD == 13 &&
               nsIContentPolicy::TYPE_FONT == 14 &&
               nsIContentPolicy::TYPE_MEDIA == 15 &&
               nsIContentPolicy::TYPE_WEBSOCKET == 16 &&
               nsIContentPolicy::TYPE_CSP_REPORT == 17 &&
               nsIContentPolicy::TYPE_XSLT == 18 &&
               nsIContentPolicy::TYPE_BEACON == 19 &&
               nsIContentPolicy::TYPE_FETCH == 20 &&
-              nsIContentPolicy::TYPE_IMAGESET == 21,
+              nsIContentPolicy::TYPE_IMAGESET == 21 &&
+              nsIContentPolicy::TYPE_WEB_MANIFEST == 22 &&
+              nsIContentPolicy::TYPE_INTERNAL_SCRIPT == 23 &&
+              nsIContentPolicy::TYPE_INTERNAL_WORKER == 24 &&
+              nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER == 25 &&
+              nsIContentPolicy::TYPE_INTERNAL_EMBED == 26 &&
+              nsIContentPolicy::TYPE_INTERNAL_OBJECT == 27 &&
+              nsIContentPolicy::TYPE_INTERNAL_FRAME == 28 &&
+              nsIContentPolicy::TYPE_INTERNAL_IFRAME == 29 &&
+              nsIContentPolicy::TYPE_INTERNAL_AUDIO == 30 &&
+              nsIContentPolicy::TYPE_INTERNAL_VIDEO == 31 &&
+              nsIContentPolicy::TYPE_INTERNAL_TRACK == 32,
               "nsContentPolicytType values are as expected");
 
 namespace {
 
 typedef int32_t EntryId;
 
 struct IdCount
 {