summaryrefslogtreecommitdiff
path: root/src/node_http_parser.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-10-29 12:49:53 -0700
committerTrevor Norris <trev.norris@gmail.com>2013-10-29 15:09:44 -0700
commit60a3e695cb6ff09f81de4195368535fdb11e2da9 (patch)
tree1e39179a155cc98ce9cca734e300d32d8cc07f5b /src/node_http_parser.cc
parent93f75a86bf6c87aa897312740aab61282b0eff1d (diff)
downloadandroid-node-v8-60a3e695cb6ff09f81de4195368535fdb11e2da9.tar.gz
android-node-v8-60a3e695cb6ff09f81de4195368535fdb11e2da9.tar.bz2
android-node-v8-60a3e695cb6ff09f81de4195368535fdb11e2da9.zip
src: don't use WeakObject::Unwrap
Switch out to use UnwrapObject from util.h.
Diffstat (limited to 'src/node_http_parser.cc')
-rw-r--r--src/node_http_parser.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc
index d6b0090756..0f5d58d507 100644
--- a/src/node_http_parser.cc
+++ b/src/node_http_parser.cc
@@ -25,6 +25,8 @@
#include "env.h"
#include "env-inl.h"
+#include "util.h"
+#include "util-inl.h"
#include "weak-object.h"
#include "weak-object-inl.h"
#include "v8.h"
@@ -362,7 +364,7 @@ class Parser : public WeakObject {
static void Execute(const FunctionCallbackInfo<Value>& args) {
HandleScope scope(node_isolate);
- Parser* parser = WeakObject::Unwrap<Parser>(args.This());
+ Parser* parser = UnwrapObject<Parser>(args.This());
assert(parser->current_buffer_.IsEmpty());
assert(parser->current_buffer_len_ == 0);
assert(parser->current_buffer_data_ == NULL);
@@ -417,7 +419,7 @@ class Parser : public WeakObject {
static void Finish(const FunctionCallbackInfo<Value>& args) {
HandleScope scope(node_isolate);
- Parser* parser = WeakObject::Unwrap<Parser>(args.This());
+ Parser* parser = UnwrapObject<Parser>(args.This());
assert(parser->current_buffer_.IsEmpty());
parser->got_exception_ = false;
@@ -451,7 +453,7 @@ class Parser : public WeakObject {
static_cast<http_parser_type>(args[0]->Int32Value());
assert(type == HTTP_REQUEST || type == HTTP_RESPONSE);
- Parser* parser = WeakObject::Unwrap<Parser>(args.This());
+ Parser* parser = UnwrapObject<Parser>(args.This());
// Should always be called from the same context.
assert(env == parser->env());
parser->Init(type);
@@ -462,7 +464,7 @@ class Parser : public WeakObject {
static void Pause(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
HandleScope handle_scope(args.GetIsolate());
- Parser* parser = WeakObject::Unwrap<Parser>(args.This());
+ Parser* parser = UnwrapObject<Parser>(args.This());
// Should always be called from the same context.
assert(env == parser->env());
http_parser_pause(&parser->parser_, should_pause);