Bug 1495994 - Part 1: Make URLValue constructor take CORSMode argument r=emilio
authorCameron McCormack <cam@mcc.id.au>
Wed, 10 Oct 2018 02:56:52 +0000
changeset 498857 a6de39c7149c9fe6d4c4f60349abbcda15d54bbf
parent 498856 6a8e290867331e18b0178b1f55ca026f813da6d5
child 498858 68ce4cece28cf47658c687fb0fd653773043a588
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1495994
milestone64.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 1495994 - Part 1: Make URLValue constructor take CORSMode argument r=emilio Differential Revision: https://phabricator.services.mozilla.com/D7593
layout/style/ServoBindings.cpp
layout/style/nsCSSValue.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1387,17 +1387,17 @@ Gecko_CounterStyle_GetAnonymous(const Co
 
 already_AddRefed<css::URLValue>
 ServoBundledURI::IntoCssUrl()
 {
   MOZ_ASSERT(mExtraData->GetReferrer());
   MOZ_ASSERT(mExtraData->GetPrincipal());
 
   RefPtr<css::URLValue> urlValue =
-    new css::URLValue(mURLString, do_AddRef(mExtraData));
+    new css::URLValue(mURLString, do_AddRef(mExtraData), CORSMode::CORS_NONE);
   return urlValue.forget();
 }
 
 already_AddRefed<css::ImageValue>
 ServoBundledURI::IntoCssImage(mozilla::CORSMode aCorsMode)
 {
   RefPtr<css::ImageValue> urlValue =
     new css::ImageValue(mURLString, do_AddRef(mExtraData), aCorsMode);
--- a/layout/style/nsCSSValue.h
+++ b/layout/style/nsCSSValue.h
@@ -187,18 +187,19 @@ private:
   URLValueData& operator=(const URLValueData& aOther) = delete;
 
   friend struct ImageValue;
 };
 
 struct URLValue final : public URLValueData
 {
   URLValue(ServoRawOffsetArc<RustString> aString,
-           already_AddRefed<URLExtraData> aExtraData)
-    : URLValueData(aString, std::move(aExtraData), CORSMode::CORS_NONE)
+           already_AddRefed<URLExtraData> aExtraData,
+           CORSMode aCORSMode)
+    : URLValueData(aString, std::move(aExtraData), aCORSMode)
   { }
 
   URLValue(const URLValue&) = delete;
   URLValue& operator=(const URLValue&) = delete;
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 };