Bug 1304302 part 7 - Break cycle reference between SRIMetadata.h and SRICheck.h. r?smaug draft
authorXidorn Quan <me@upsuper.org>
Mon, 26 Sep 2016 09:26:13 +1000
changeset 417490 72647db10ffd6bee3c53fe68e99c50329228bfca
parent 417489 51fdc11721bef68046480ac45ef2c0539e8f97af
child 417491 b75abaaaa138722f438d6ab5ab94b99e8ca460b7
push id30405
push userxquan@mozilla.com
push dateSun, 25 Sep 2016 23:29:22 +0000
reviewerssmaug
bugs1304302
milestone51.0a1
Bug 1304302 part 7 - Break cycle reference between SRIMetadata.h and SRICheck.h. r?smaug MozReview-Commit-ID: 8UpAEXURuSg
dom/fetch/FetchDriver.h
dom/security/SRICheck.cpp
dom/security/SRICheck.h
--- a/dom/fetch/FetchDriver.h
+++ b/dom/fetch/FetchDriver.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_dom_FetchDriver_h
 #define mozilla_dom_FetchDriver_h
 
 #include "nsIChannelEventSink.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIStreamListener.h"
 #include "nsIThreadRetargetableStreamListener.h"
 #include "mozilla/ConsoleReportCollector.h"
-#include "mozilla/dom/SRICheck.h"
+#include "mozilla/dom/SRIMetadata.h"
 #include "mozilla/RefPtr.h"
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/net/ReferrerPolicy.h"
 
 class nsIConsoleReportCollector;
 class nsIDocument;
 class nsIOutputStream;
--- a/dom/security/SRICheck.cpp
+++ b/dom/security/SRICheck.cpp
@@ -6,16 +6,17 @@
 
 #include "SRICheck.h"
 
 #include "mozilla/Base64.h"
 #include "mozilla/LoadTainting.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/SRILogHelper.h"
+#include "mozilla/dom/SRIMetadata.h"
 #include "nsContentUtils.h"
 #include "nsIChannel.h"
 #include "nsIConsoleReportCollector.h"
 #include "nsIProtocolHandler.h"
 #include "nsIScriptError.h"
 #include "nsIIncrementalStreamLoader.h"
 #include "nsIUnicharStreamLoader.h"
 #include "nsIURI.h"
--- a/dom/security/SRICheck.h
+++ b/dom/security/SRICheck.h
@@ -4,25 +4,26 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SRICheck_h
 #define mozilla_dom_SRICheck_h
 
 #include "nsCOMPtr.h"
 #include "nsICryptoHash.h"
-#include "SRIMetadata.h"
 
 class nsIChannel;
 class nsIUnicharStreamLoader;
 class nsIConsoleReportCollector;
 
 namespace mozilla {
 namespace dom {
 
+class SRIMetadata;
+
 class SRICheck final
 {
 public:
   static const uint32_t MAX_METADATA_LENGTH = 24*1024;
   static const uint32_t MAX_METADATA_TOKENS = 512;
 
   /**
    * Parse the multiple hashes specified in the integrity attribute and