diff options
author | 2017-01-20 13:39:08 -0800 | |
---|---|---|
committer | 2017-01-20 13:39:08 -0800 | |
commit | 28ec869b5a2567cd30a6e3bcc0efbee0ab0ae7f5 (patch) | |
tree | be591d8c9033c3c4aa064b458acc8e7fe62d7598 /src/node/ext/call.h | |
parent | bd827887ffbb57a95990130f585913b13f44a5b7 (diff) | |
parent | 2b5cf1ff2681bb94fa1e3651f8ccfc14bdfa71b2 (diff) |
Merge pull request #8842 from ctiller/metadata_filter
Metadata handling rewrite
Diffstat (limited to 'src/node/ext/call.h')
-rw-r--r-- | src/node/ext/call.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/node/ext/call.h b/src/node/ext/call.h index 31c6566d14..cffff00fce 100644 --- a/src/node/ext/call.h +++ b/src/node/ext/call.h @@ -51,20 +51,12 @@ namespace node { using std::unique_ptr; using std::shared_ptr; -typedef Nan::Persistent<v8::Value, Nan::CopyablePersistentTraits<v8::Value>> PersistentValue; - v8::Local<v8::Value> nanErrorWithCode(const char *msg, grpc_call_error code); v8::Local<v8::Value> ParseMetadata(const grpc_metadata_array *metadata_array); -struct Resources { - std::vector<unique_ptr<Nan::Utf8String> > strings; - std::vector<unique_ptr<PersistentValue> > handles; -}; - bool CreateMetadataArray(v8::Local<v8::Object> metadata, - grpc_metadata_array *array, - shared_ptr<Resources> resources); + grpc_metadata_array *array); /* Wrapper class for grpc_call structs. */ class Call : public Nan::ObjectWrap { @@ -106,8 +98,7 @@ class Call : public Nan::ObjectWrap { class Op { public: virtual v8::Local<v8::Value> GetNodeValue() const = 0; - virtual bool ParseOp(v8::Local<v8::Value> value, grpc_op *out, - shared_ptr<Resources> resources) = 0; + virtual bool ParseOp(v8::Local<v8::Value> value, grpc_op *out) = 0; virtual ~Op(); v8::Local<v8::Value> GetOpType() const; virtual bool IsFinalOp() = 0; @@ -118,12 +109,10 @@ class Op { typedef std::vector<unique_ptr<Op>> OpVec; struct tag { - tag(Nan::Callback *callback, OpVec *ops, - shared_ptr<Resources> resources, Call *call); + tag(Nan::Callback *callback, OpVec *ops, Call *call); ~tag(); Nan::Callback *callback; OpVec *ops; - shared_ptr<Resources> resources; Call *call; }; |