@@ -270,8 +270,7 @@ static size_t hex_decode(char* buf,
270270}
271271
272272
273- bool StringBytes::GetExternalParts (Isolate* isolate,
274- Local<Value> val,
273+ bool StringBytes::GetExternalParts (Local<Value> val,
275274 const char ** data,
276275 size_t * len) {
277276 if (Buffer::HasInstance (val)) {
@@ -306,8 +305,6 @@ bool StringBytes::GetExternalParts(Isolate* isolate,
306305
307306size_t StringBytes::WriteUCS2 (char * buf,
308307 size_t buflen,
309- size_t nbytes,
310- const char * data,
311308 Local<String> str,
312309 int flags,
313310 size_t * chars_written) {
@@ -353,7 +350,7 @@ size_t StringBytes::Write(Isolate* isolate,
353350 HandleScope scope (isolate);
354351 const char * data = nullptr ;
355352 size_t nbytes = 0 ;
356- const bool is_extern = GetExternalParts (isolate, val, &data, &nbytes);
353+ const bool is_extern = GetExternalParts (val, &data, &nbytes);
357354 const size_t external_nbytes = nbytes;
358355
359356 CHECK (val->IsString () == true );
@@ -391,7 +388,7 @@ size_t StringBytes::Write(Isolate* isolate,
391388 memcpy (buf, data, nbytes);
392389 nchars = nbytes / sizeof (uint16_t );
393390 } else {
394- nbytes = WriteUCS2 (buf, buflen, nbytes, data, str, flags, &nchars);
391+ nbytes = WriteUCS2 (buf, buflen, str, flags, &nchars);
395392 }
396393 if (chars_written != nullptr )
397394 *chars_written = nchars;
@@ -439,8 +436,7 @@ size_t StringBytes::Write(Isolate* isolate,
439436}
440437
441438
442- bool StringBytes::IsValidString (Isolate* isolate,
443- Local<String> string,
439+ bool StringBytes::IsValidString (Local<String> string,
444440 enum encoding enc) {
445441 if (enc == HEX && string->Length () % 2 != 0 )
446442 return false ;
@@ -512,7 +508,7 @@ size_t StringBytes::Size(Isolate* isolate,
512508 return Buffer::Length (val);
513509
514510 const char * data;
515- if (GetExternalParts (isolate, val, &data, &data_size))
511+ if (GetExternalParts (val, &data, &data_size))
516512 return data_size;
517513
518514 Local<String> str = val->ToString (isolate);
0 commit comments