summaryrefslogtreecommitdiffstats
path: root/dom/fetch/InternalHeaders.cpp
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2019-03-13 18:46:01 +0200
committerJustOff <Off.Just.Off@gmail.com>2019-03-13 18:46:01 +0200
commit5a10462a92197769cc7af04287c6315fa8961dcd (patch)
tree429506826bc8fe39a46f9622ed5bda491f4d3c9a /dom/fetch/InternalHeaders.cpp
parentbcdacfe2dfb9c9e36de462182562ebf4eec94f36 (diff)
downloadUXP-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/InternalHeaders.cpp')
-rw-r--r--dom/fetch/InternalHeaders.cpp9
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;
+ }
}
}