diff options
author | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 18:46:01 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 18:46:01 +0200 |
commit | 5a10462a92197769cc7af04287c6315fa8961dcd (patch) | |
tree | 429506826bc8fe39a46f9622ed5bda491f4d3c9a /dom/fetch | |
parent | bcdacfe2dfb9c9e36de462182562ebf4eec94f36 (diff) | |
download | UXP-5a10462a92197769cc7af04287c6315fa8961dcd.tar UXP-5a10462a92197769cc7af04287c6315fa8961dcd.tar.gz UXP-5a10462a92197769cc7af04287c6315fa8961dcd.tar.lz UXP-5a10462a92197769cc7af04287c6315fa8961dcd.tar.xz UXP-5a10462a92197769cc7af04287c6315fa8961dcd.zip |
Change the MozMap API and data storage to more what we want record<> to look like
Diffstat (limited to 'dom/fetch')
-rw-r--r-- | dom/fetch/InternalHeaders.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dom/fetch/InternalHeaders.cpp b/dom/fetch/InternalHeaders.cpp index 11585615e..83a686785 100644 --- a/dom/fetch/InternalHeaders.cpp +++ b/dom/fetch/InternalHeaders.cpp @@ -316,10 +316,11 @@ InternalHeaders::Fill(const Sequence<Sequence<nsCString>>& aInit, ErrorResult& a void InternalHeaders::Fill(const MozMap<nsCString>& aInit, ErrorResult& aRv) { - nsTArray<nsString> keys; - aInit.GetKeys(keys); - for (uint32_t i = 0; i < keys.Length() && !aRv.Failed(); ++i) { - Append(NS_ConvertUTF16toUTF8(keys[i]), aInit.Get(keys[i]), aRv); + for (auto& entry : aInit.Entries()) { + Append(NS_ConvertUTF16toUTF8(entry.mKey), entry.mValue, aRv); + if (aRv.Failed()) { + return; + } } } |