diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-18 08:14:23 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-18 08:14:23 +0100 |
commit | a36c3f69c82e1a38b43f0c5f36c562fb08615c62 (patch) | |
tree | 78f9875465a215447e28f1a2c8363c2ea05b3a87 /dom/fetch/InternalHeaders.cpp | |
parent | c7c3c8600febd196152e5b23f687cbe8aa493627 (diff) | |
parent | b0c7cca308a4321dea734044ccdb511dbedea83b (diff) | |
download | UXP-a36c3f69c82e1a38b43f0c5f36c562fb08615c62.tar UXP-a36c3f69c82e1a38b43f0c5f36c562fb08615c62.tar.gz UXP-a36c3f69c82e1a38b43f0c5f36c562fb08615c62.tar.lz UXP-a36c3f69c82e1a38b43f0c5f36c562fb08615c62.tar.xz UXP-a36c3f69c82e1a38b43f0c5f36c562fb08615c62.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'dom/fetch/InternalHeaders.cpp')
-rw-r--r-- | dom/fetch/InternalHeaders.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dom/fetch/InternalHeaders.cpp b/dom/fetch/InternalHeaders.cpp index 11585615e..f66221d42 100644 --- a/dom/fetch/InternalHeaders.cpp +++ b/dom/fetch/InternalHeaders.cpp @@ -314,12 +314,13 @@ InternalHeaders::Fill(const Sequence<Sequence<nsCString>>& aInit, ErrorResult& a } void -InternalHeaders::Fill(const MozMap<nsCString>& aInit, ErrorResult& aRv) +InternalHeaders::Fill(const Record<nsCString, 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(entry.mKey, entry.mValue, aRv); + if (aRv.Failed()) { + return; + } } } |