@@ -77,33 +77,33 @@ static bool validateBytecodeCachePath(NSURL* cachePath, NSError** error)
7777
7878 URL cachePathURL ([cachePath absoluteURL ]);
7979 if (!cachePathURL.protocolIsFile ()) {
80- createError ([NSString stringWithFormat: @" Cache path `%@ ` is not a local file" , static_cast < NSURL *>( cachePathURL)], error);
80+ createError ([NSString stringWithFormat: @" Cache path `%@ ` is not a local file" , cachePathURL. createNSURL (). get ( )], error);
8181 return false ;
8282 }
8383
8484 String systemPath = cachePathURL.fileSystemPath ();
8585
8686 if (auto fileType = FileSystem::fileType (systemPath)) {
8787 if (*fileType != FileSystem::FileType::Regular) {
88- createError ([NSString stringWithFormat: @" Cache path `%@ ` already exists and is not a file" , static_cast < NSString *>( systemPath)], error);
88+ createError ([NSString stringWithFormat: @" Cache path `%@ ` already exists and is not a file" , systemPath. createNSString (). get ( )], error);
8989 return false ;
9090 }
9191 }
9292
9393 String directory = FileSystem::parentPath (systemPath);
9494 if (directory.isNull ()) {
95- createError ([NSString stringWithFormat: @" Cache path `%@ ` does not contain in a valid directory" , static_cast < NSString *>( systemPath)], error);
95+ createError ([NSString stringWithFormat: @" Cache path `%@ ` does not contain in a valid directory" , systemPath. createNSString (). get ( )], error);
9696 return false ;
9797 }
9898
9999 if (FileSystem::fileType (directory) != FileSystem::FileType::Directory) {
100- createError ([NSString stringWithFormat: @" Cache directory `%@ ` is not a directory or does not exist" , static_cast < NSString *>( directory)], error);
100+ createError ([NSString stringWithFormat: @" Cache directory `%@ ` is not a directory or does not exist" , directory. createNSString (). get ( )], error);
101101 return false ;
102102 }
103103
104104#if USE(APPLE_INTERNAL_SDK)
105105 if (rootless_check_datavault_flag (FileSystem::fileSystemRepresentation (directory).data (), nullptr )) {
106- createError ([NSString stringWithFormat: @" Cache directory `%@ ` is not a data vault" , static_cast < NSString *>( directory)], error);
106+ createError ([NSString stringWithFormat: @" Cache directory `%@ ` is not a data vault" , directory. createNSString (). get ( )], error);
107107 return false ;
108108 }
109109#endif
@@ -133,15 +133,15 @@ + (instancetype)scriptOfType:(JSScriptType)type memoryMappedFromASCIIFile:(NSURL
133133
134134 URL filePathURL ([filePath absoluteURL ]);
135135 if (!filePathURL.protocolIsFile ())
136- return createError ([NSString stringWithFormat: @" File path %@ is not a local file" , static_cast < NSURL *>( filePathURL)], error);
136+ return createError ([NSString stringWithFormat: @" File path %@ is not a local file" , filePathURL. createNSURL (). get ( )], error);
137137
138138 String systemPath = filePathURL.fileSystemPath ();
139139 auto fileData = FileSystem::mapFile (systemPath, FileSystem::MappedFileMode::Shared);
140140 if (!fileData)
141- return createError ([NSString stringWithFormat: @" File at path %@ could not be mapped." , static_cast < NSString *>( systemPath)], error);
141+ return createError ([NSString stringWithFormat: @" File at path %@ could not be mapped." , systemPath. createNSString (). get ( )], error);
142142
143143 if (!charactersAreAllASCII (fileData->span ()))
144- return createError ([NSString stringWithFormat: @" Not all characters in file at %@ are ASCII." , static_cast < NSString *>( systemPath)], error);
144+ return createError ([NSString stringWithFormat: @" Not all characters in file at %@ are ASCII." , systemPath. createNSString (). get ( )], error);
145145
146146 auto result = adoptNS ([[JSScript alloc ] init ]);
147147 result->m_virtualMachine = vm;
0 commit comments