@@ -530,17 +530,6 @@ MaybeLocal<Object> New(Environment* env,
530
530
531
531
namespace {
532
532
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
-
544
533
template <encoding encoding>
545
534
void StringSlice (const FunctionCallbackInfo<Value>& args) {
546
535
Environment* env = Environment::GetCurrent (args);
@@ -1436,7 +1425,6 @@ void Initialize(Local<Object> target,
1436
1425
SetMethodNoSideEffect (context, target, " btoa" , Btoa);
1437
1426
1438
1427
SetMethod (context, target, " setBufferPrototype" , SetBufferPrototype);
1439
- SetMethodNoSideEffect (context, target, " createFromString" , CreateFromString);
1440
1428
1441
1429
SetFastMethodNoSideEffect (context,
1442
1430
target,
@@ -1501,7 +1489,6 @@ void Initialize(Local<Object> target,
1501
1489
1502
1490
void RegisterExternalReferences (ExternalReferenceRegistry* registry) {
1503
1491
registry->Register (SetBufferPrototype);
1504
- registry->Register (CreateFromString);
1505
1492
1506
1493
registry->Register (SlowByteLengthUtf8);
1507
1494
registry->Register (fast_byte_length_utf8.GetTypeInfo ());
0 commit comments