@@ -1601,9 +1601,9 @@ static inline std::string fromStringView(v8::Isolate* isolate, const v8_inspecto
16011601// / @param output: Points to the now allocated string on the heap (without sentinel \0), NULL if view was null, invalid if allocation failed
16021602// / @returns false if allocation errored
16031603bool allocString (const v8_inspector::StringView& input, const void * allocator, CZigString& output) {
1604+ output.ptr = nullptr ;
1605+ output.len = 0 ;
16041606 if (input.characters8 () == nullptr ) {
1605- output.ptr = nullptr ;
1606- output.len = 0 ;
16071607 return true ;
16081608 }
16091609
@@ -1736,9 +1736,11 @@ void v8_inspector__RemoteObject__DELETE(v8_inspector::protocol::Runtime::RemoteO
17361736}
17371737
17381738// RemoteObject - Type
1739- bool v8_inspector__RemoteObject__getType (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_type ) {
1739+ CZigString v8_inspector__RemoteObject__getType (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17401740 auto str = self->getType ();
1741- return allocString (toStringView (str), allocator, out_type);
1741+ CZigString result;
1742+ allocString (toStringView (str), allocator, result);
1743+ return result;
17421744}
17431745void v8_inspector__RemoteObject__setType (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString type) {
17441746 self->setType (v8_inspector::String16::fromUTF8 (type.ptr , type.len ));
@@ -1748,9 +1750,11 @@ void v8_inspector__RemoteObject__setType(v8_inspector::protocol::Runtime::Remote
17481750bool v8_inspector__RemoteObject__hasSubtype (v8_inspector::protocol::Runtime::RemoteObject* self) {
17491751 return self->hasSubtype ();
17501752}
1751- bool v8_inspector__RemoteObject__getSubtype (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_subtype ) {
1753+ CZigString v8_inspector__RemoteObject__getSubtype (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17521754 auto str = self->getSubtype (DEFAULT_STRING);
1753- return allocString (toStringView (str), allocator, out_subtype);
1755+ CZigString result;
1756+ allocString (toStringView (str), allocator, result);
1757+ return result;
17541758}
17551759void v8_inspector__RemoteObject__setSubtype (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString subtype) {
17561760 self->setSubtype (v8_inspector::String16::fromUTF8 (subtype.ptr , subtype.len ));
@@ -1760,9 +1764,11 @@ void v8_inspector__RemoteObject__setSubtype(v8_inspector::protocol::Runtime::Rem
17601764bool v8_inspector__RemoteObject__hasClassName (v8_inspector::protocol::Runtime::RemoteObject* self) {
17611765 return self->hasClassName ();
17621766}
1763- bool v8_inspector__RemoteObject__getClassName (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_className ) {
1767+ CZigString v8_inspector__RemoteObject__getClassName (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17641768 auto str = self->getClassName (DEFAULT_STRING);
1765- return allocString (toStringView (str), allocator, out_className);
1769+ CZigString result;
1770+ allocString (toStringView (str), allocator, result);
1771+ return result;
17661772}
17671773void v8_inspector__RemoteObject__setClassName (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString className) {
17681774 self->setClassName (v8_inspector::String16::fromUTF8 (className.ptr , className.len ));
@@ -1783,9 +1789,11 @@ void v8_inspector__RemoteObject__setValue(v8_inspector::protocol::Runtime::Remot
17831789bool v8_inspector__RemoteObject__hasUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self) {
17841790 return self->hasUnserializableValue ();
17851791}
1786- bool v8_inspector__RemoteObject__getUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_unserializableValue ) {
1792+ CZigString v8_inspector__RemoteObject__getUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17871793 auto str = self->getUnserializableValue (DEFAULT_STRING);
1788- return allocString (toStringView (str), allocator, out_unserializableValue);
1794+ CZigString result;
1795+ allocString (toStringView (str), allocator, result);
1796+ return result;
17891797}
17901798void v8_inspector__RemoteObject__setUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString unserializableValue) {
17911799 self->setUnserializableValue (v8_inspector::String16::fromUTF8 (unserializableValue.ptr , unserializableValue.len ));
@@ -1795,9 +1803,11 @@ void v8_inspector__RemoteObject__setUnserializableValue(v8_inspector::protocol::
17951803bool v8_inspector__RemoteObject__hasDescription (v8_inspector::protocol::Runtime::RemoteObject* self) {
17961804 return self->hasDescription ();
17971805}
1798- bool v8_inspector__RemoteObject__getDescription (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_description ) {
1806+ CZigString v8_inspector__RemoteObject__getDescription (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17991807 auto str = self->getDescription (DEFAULT_STRING);
1800- return allocString (toStringView (str), allocator, out_description);
1808+ CZigString result;
1809+ allocString (toStringView (str), allocator, result);
1810+ return result;
18011811}
18021812void v8_inspector__RemoteObject__setDescription (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString description) {
18031813 self->setDescription (v8_inspector::String16::fromUTF8 (description.ptr , description.len ));
@@ -1819,11 +1829,13 @@ bool v8_inspector__RemoteObject__hasObjectId(v8_inspector::protocol::Runtime::Re
18191829 return self->hasObjectId ();
18201830}
18211831
1822- bool v8_inspector__RemoteObject__getObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator, CZigString& out_objectId ) {
1832+ CZigString v8_inspector__RemoteObject__getObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
18231833 auto str = self->getObjectId (DEFAULT_STRING);
1824- return allocString (toStringView (str), allocator, out_objectId);
1834+ CZigString result;
1835+ allocString (toStringView (str), allocator, result);
1836+ return result;
18251837}
1826- void v8_inspector__RemoteObject__setObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString objectId) {
1838+ void v8_inspector__RemoteObject__setObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, CZigString objectId) {
18271839 self->setObjectId (v8_inspector::String16::fromUTF8 (objectId.ptr , objectId.len ));
18281840}
18291841
0 commit comments