From 72216372d5684422046dff3d694270eb58522d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 1 Feb 2023 16:41:52 +0100 Subject: [PATCH] fix: don't use C++ references for possibly-null pointers (#1179) Co-authored-by: Bert Belder --- src/binding.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/binding.cc b/src/binding.cc index f39f30ee..575d95a1 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -1046,8 +1046,8 @@ bool v8__String__ContainsOnlyOneByte(const v8::String& self) { } const v8::Symbol* v8__Symbol__New(v8::Isolate* isolate, - const v8::String& description) { - return local_to_ptr(v8::Symbol::New(isolate, ptr_to_local(&description))); + const v8::String* description) { + return local_to_ptr(v8::Symbol::New(isolate, ptr_to_local(description))); } const v8::Symbol* v8__Symbol__For(v8::Isolate* isolate, @@ -1084,13 +1084,13 @@ const v8::Value* v8__Symbol__Description(const v8::Symbol& self, } const v8::Private* v8__Private__New(v8::Isolate* isolate, - const v8::String& name) { - return local_to_ptr(v8::Private::New(isolate, ptr_to_local(&name))); + const v8::String* name) { + return local_to_ptr(v8::Private::New(isolate, ptr_to_local(name))); } const v8::Private* v8__Private__ForApi(v8::Isolate* isolate, - const v8::String& name) { - return local_to_ptr(v8::Private::ForApi(isolate, ptr_to_local(&name))); + const v8::String* name) { + return local_to_ptr(v8::Private::ForApi(isolate, ptr_to_local(name))); } const v8::Value* v8__Private__Name(const v8::Private& self) {