diff --git a/test/addons/new-target/binding.cc b/test/addons/new-target/binding.cc index 5491c18c6e99af..3ae2aca7c2ef95 100644 --- a/test/addons/new-target/binding.cc +++ b/test/addons/new-target/binding.cc @@ -3,7 +3,11 @@ namespace { -inline void NewClass(const v8::FunctionCallbackInfo&) {} +inline void NewClass(const v8::FunctionCallbackInfo& args) { + // this != new.target since we are being invoked through super(). + assert(args.IsConstructCall()); + assert(!args.This()->StrictEquals(args.NewTarget())); +} inline void Initialize(v8::Local binding) { auto isolate = binding->GetIsolate();