Skip to content

Commit

Permalink
fix: 7.x has different type for raw headers
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Jan 15, 2020
1 parent 0a2f98a commit 27a258e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions shell/browser/api/atom_api_url_loader.cc
Expand Up @@ -33,21 +33,21 @@
#include "shell/common/node_includes.h"
#include "shell/common/promise_util.h"

namespace gin {
namespace mate {

template <>
struct Converter<network::mojom::HttpRawHeaderPairPtr> {
struct Converter<std::pair<std::string, std::string>> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const network::mojom::HttpRawHeaderPairPtr& pair) {
gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(isolate);
dict.Set("key", base::ToLowerASCII(pair->key));
dict.Set("value", pair->value);
const std::pair<std::string, std::string>& pair) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.Set("key", base::ToLowerASCII(pair.first));
dict.Set("value", pair.second);
return dict.GetHandle();
}
};

} // namespace gin
} // namespace mate

namespace electron {

Expand Down

0 comments on commit 27a258e

Please sign in to comment.