From f5651bd75d78f523fb74c99799489cfc4ee7173e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 29 Dec 2016 18:33:47 +0100 Subject: [PATCH] Bug 1304792: Use borrowed types for ServoImportRule. r=Manishearth r=heycam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: HKjsOaE2qAp Signed-off-by: Emilio Cobos Álvarez --- layout/style/Loader.cpp | 4 ++-- layout/style/Loader.h | 4 ++-- layout/style/ServoBindings.cpp | 5 ++--- layout/style/ServoBindings.h | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 50630806be9b..ccdf9ebd972d 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -1407,7 +1407,7 @@ nsresult Loader::InsertChildSheet(StyleSheet* aSheet, StyleSheet* aParentSheet, ImportRule* aGeckoParentRule, - RawServoImportRule* aServoParentRule) + const RawServoImportRule* aServoParentRule) { LOG(("css::Loader::InsertChildSheet")); MOZ_ASSERT(aSheet, "Nothing to insert"); @@ -2198,7 +2198,7 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet, nsIURI* aURL, nsMediaList* aMedia, ImportRule* aGeckoParentRule, - RawServoImportRule* aServoParentRule, + const RawServoImportRule* aServoParentRule, LoaderReusableStyleSheets* aReusableSheets) { LOG(("css::Loader::LoadChildSheet")); diff --git a/layout/style/Loader.h b/layout/style/Loader.h index 583d88746438..a67498d67f65 100644 --- a/layout/style/Loader.h +++ b/layout/style/Loader.h @@ -297,7 +297,7 @@ public: nsIURI* aURL, nsMediaList* aMedia, ImportRule* aGeckoParentRule, - RawServoImportRule* aServoParentRule, + const RawServoImportRule* aServoParentRule, LoaderReusableStyleSheets* aSavedSheets); /** @@ -489,7 +489,7 @@ private: nsresult InsertChildSheet(StyleSheet* aSheet, StyleSheet* aParentSheet, ImportRule* aGeckoParentRule, - RawServoImportRule* aServoParentRule); + const RawServoImportRule* aServoParentRule); nsresult InternalLoadNonDocumentSheet(nsIURI* aURL, bool aIsPreload, diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index edcb3ce5a10a..352388a14afe 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -1032,7 +1032,7 @@ Gecko_CSSValue_GetArrayItem(nsCSSValueBorrowedMut aCSSValue, int32_t aIndex) void Gecko_LoadStyleSheet(css::Loader* aLoader, ServoStyleSheet* aParent, - RawServoImportRuleStrong aImportRule, + RawServoImportRuleBorrowed aImportRule, const uint8_t* aURLString, uint32_t aURLStringLength, const uint8_t* aMediaString, @@ -1060,8 +1060,7 @@ Gecko_LoadStyleSheet(css::Loader* aLoader, nsCOMPtr uri; MOZ_ALWAYS_SUCCEEDS(NS_NewURI(getter_AddRefs(uri), urlSpec)); - RefPtr import = aImportRule.Consume(); - aLoader->LoadChildSheet(aParent, uri, media, nullptr, import, nullptr); + aLoader->LoadChildSheet(aParent, uri, media, nullptr, aImportRule, nullptr); } NS_IMPL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList); diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index 5156803378ca..37cccdff2783 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -98,7 +98,7 @@ RawGeckoElementBorrowedOrNull Gecko_GetNextSiblingElement(RawGeckoElementBorrowe RawGeckoElementBorrowedOrNull Gecko_GetDocumentElement(RawGeckoDocumentBorrowed document); void Gecko_LoadStyleSheet(mozilla::css::Loader* loader, mozilla::ServoStyleSheet* parent, - RawServoImportRuleStrong import_rule, + RawServoImportRuleBorrowed import_rule, const uint8_t* url_bytes, uint32_t url_length, const uint8_t* media_bytes,