2525
2626#include "env.h"
2727#include "env-inl.h"
28+ #include "util.h"
29+ #include "util-inl.h"
2830#include "weak-object.h"
2931#include "weak-object-inl.h"
3032#include "v8.h"
@@ -362,7 +364,7 @@ class Parser : public WeakObject {
362364 static void Execute(const FunctionCallbackInfo<Value>& args) {
363365 HandleScope scope(node_isolate);
364366
365- Parser* parser = WeakObject::Unwrap <Parser>(args.This());
367+ Parser* parser = UnwrapObject <Parser>(args.This());
366368 assert(parser->current_buffer_.IsEmpty());
367369 assert(parser->current_buffer_len_ == 0);
368370 assert(parser->current_buffer_data_ == NULL);
@@ -417,7 +419,7 @@ class Parser : public WeakObject {
417419 static void Finish(const FunctionCallbackInfo<Value>& args) {
418420 HandleScope scope(node_isolate);
419421
420- Parser* parser = WeakObject::Unwrap <Parser>(args.This());
422+ Parser* parser = UnwrapObject <Parser>(args.This());
421423
422424 assert(parser->current_buffer_.IsEmpty());
423425 parser->got_exception_ = false;
@@ -451,7 +453,7 @@ class Parser : public WeakObject {
451453 static_cast<http_parser_type>(args[0]->Int32Value());
452454
453455 assert(type == HTTP_REQUEST || type == HTTP_RESPONSE);
454- Parser* parser = WeakObject::Unwrap <Parser>(args.This());
456+ Parser* parser = UnwrapObject <Parser>(args.This());
455457 // Should always be called from the same context.
456458 assert(env == parser->env());
457459 parser->Init(type);
@@ -462,7 +464,7 @@ class Parser : public WeakObject {
462464 static void Pause(const FunctionCallbackInfo<Value>& args) {
463465 Environment* env = Environment::GetCurrent(args.GetIsolate());
464466 HandleScope handle_scope(args.GetIsolate());
465- Parser* parser = WeakObject::Unwrap <Parser>(args.This());
467+ Parser* parser = UnwrapObject <Parser>(args.This());
466468 // Should always be called from the same context.
467469 assert(env == parser->env());
468470 http_parser_pause(&parser->parser_, should_pause);
0 commit comments