This repository was archived by the owner on Apr 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-28
lines changed Expand file tree Collapse file tree 3 files changed +12
-28
lines changed Original file line number Diff line number Diff line change 171171 'lib/internal/v8_prof_polyfill.js' ,
172172 'lib/internal/v8_prof_processor.js' ,
173173 'lib/internal/validators.js' ,
174+ 'lib/internal/vm/source_text_module.js' ,
174175 'lib/internal/stream_base_commons.js' ,
175176 'lib/internal/worker.js' ,
176177 'lib/internal/streams/lazy_transform.js' ,
Original file line number Diff line number Diff line change @@ -443,30 +443,6 @@ inline bool ShouldBeTreatedAsRelativeOrAbsolutePath(
443443 return false ;
444444}
445445
446- std::string ReadFile (uv_file file) {
447- std::string contents;
448- uv_fs_t req;
449- char buffer_memory[4096 ];
450- uv_buf_t buf = uv_buf_init (buffer_memory, sizeof (buffer_memory));
451- int r;
452-
453- do {
454- r = uv_fs_read (uv_default_loop (),
455- &req,
456- file,
457- &buf,
458- 1 ,
459- contents.length (), // offset
460- nullptr );
461- uv_fs_req_cleanup (&req);
462-
463- if (r <= 0 )
464- break ;
465- contents.append (buf.base , r);
466- } while (true );
467- return contents;
468- }
469-
470446enum CheckFileOptions {
471447 LEAVE_OPEN_AFTER_CHECK,
472448 CLOSE_AFTER_CHECK
@@ -536,10 +512,6 @@ Maybe<URL> ResolveExtensions(const URL& search) {
536512 return Nothing<URL>();
537513}
538514
539- inline Maybe<URL> ResolveIndex (const URL& search) {
540- return ResolveExtensions<ONLY_VIA_EXTENSIONS>(URL (" index" , search));
541- }
542-
543515Maybe<URL> ResolveModule (Environment* env,
544516 const std::string& specifier,
545517 const URL& base) {
Original file line number Diff line number Diff line change 1212namespace node {
1313namespace loader {
1414
15+ enum ScriptType : int {
16+ kScript ,
17+ kModule ,
18+ };
19+
20+ enum HostDefinedOptions : int {
21+ kType = 8 ,
22+ kID = 9 ,
23+ kLength = 10 ,
24+ };
25+
1526v8::Maybe<url::URL> Resolve (Environment* env,
1627 const std::string& specifier,
1728 const url::URL& base);
You can’t perform that action at this time.
0 commit comments