@@ -530,17 +530,6 @@ MaybeLocal<Object> New(Environment* env,
530530
531531namespace {
532532
533- void CreateFromString (const FunctionCallbackInfo<Value>& args) {
534- CHECK (args[0 ]->IsString ());
535- CHECK (args[1 ]->IsInt32 ());
536-
537- enum encoding enc = static_cast <enum encoding>(args[1 ].As <Int32>()->Value ());
538- Local<Object> buf;
539- if (New (args.GetIsolate (), args[0 ].As <String>(), enc).ToLocal (&buf))
540- args.GetReturnValue ().Set (buf);
541- }
542-
543-
544533template <encoding encoding>
545534void StringSlice (const FunctionCallbackInfo<Value>& args) {
546535 Environment* env = Environment::GetCurrent (args);
@@ -1436,7 +1425,6 @@ void Initialize(Local<Object> target,
14361425 SetMethodNoSideEffect (context, target, " btoa" , Btoa);
14371426
14381427 SetMethod (context, target, " setBufferPrototype" , SetBufferPrototype);
1439- SetMethodNoSideEffect (context, target, " createFromString" , CreateFromString);
14401428
14411429 SetFastMethodNoSideEffect (context,
14421430 target,
@@ -1501,7 +1489,6 @@ void Initialize(Local<Object> target,
15011489
15021490void RegisterExternalReferences (ExternalReferenceRegistry* registry) {
15031491 registry->Register (SetBufferPrototype);
1504- registry->Register (CreateFromString);
15051492
15061493 registry->Register (SlowByteLengthUtf8);
15071494 registry->Register (fast_byte_length_utf8.GetTypeInfo ());
0 commit comments