Auto merge of #18516 - jdm:stringshare, r=heycam

Share specified URLs with Gecko

This makes use of our Arc offset machinery to allow Gecko to store Arc<String> values and ensure there are used appropriately.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix [bug 1397971](https://bugzilla.mozilla.org/show_bug.cgi?id=1397971).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18516)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-15 04:05:20 -05:00 committed by GitHub
commit 70a6b2fa91
5 changed files with 173 additions and 38 deletions

View file

@ -19,6 +19,7 @@ use gecko_bindings::structs::mozilla::MallocSizeOf;
use gecko_bindings::structs::mozilla::OriginFlags;
use gecko_bindings::structs::mozilla::Side;
use gecko_bindings::structs::mozilla::UniquePtr;
use gecko_bindings::structs::ServoRawOffsetArc;
use gecko_bindings::structs::nsIContent;
use gecko_bindings::structs::nsIDocument;
use gecko_bindings::structs::nsIDocument_DocumentTheme;
@ -46,6 +47,7 @@ use gecko_bindings::structs::RawGeckoServoStyleRuleList;
use gecko_bindings::structs::RawGeckoURLExtraData;
use gecko_bindings::structs::RawGeckoXBLBinding;
use gecko_bindings::structs::RefPtr;
use gecko_bindings::structs::RustString;
use gecko_bindings::structs::CSSPseudoClassType;
use gecko_bindings::structs::CSSPseudoElementType;
use gecko_bindings::structs::ServoTraversalFlags;
@ -998,7 +1000,9 @@ extern "C" {
pub fn Gecko_ReleaseImageValueArbitraryThread(aPtr: *mut ImageValue);
}
extern "C" {
pub fn Gecko_ImageValue_Create(aURI: ServoBundledURI) -> *mut ImageValue;
pub fn Gecko_ImageValue_Create(aURI: ServoBundledURI,
aURIString: ServoRawOffsetArc<RustString>)
-> *mut ImageValue;
}
extern "C" {
pub fn Gecko_ImageValue_SizeOfIncludingThis(aImageValue: *mut ImageValue)