OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | |
6 #include <errno.h> | 5 #include <errno.h> |
7 #include <fcntl.h> | 6 #include <fcntl.h> |
8 #include <signal.h> | |
9 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> |
| 9 #include <sys/select.h> |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
11 #include <sys/time.h> | 11 #include <sys/time.h> |
12 #include <sys/types.h> | 12 #include <sys/types.h> |
13 #include <sys/wait.h> | 13 #include <sys/wait.h> |
14 #include <time.h> | |
15 #include <unistd.h> | 14 #include <unistd.h> |
16 | 15 |
17 | |
18 #include "src/d8.h" | 16 #include "src/d8.h" |
19 #include "src/d8-debug.h" | |
20 #include "src/debug.h" | |
21 | 17 |
22 | 18 |
23 namespace v8 { | 19 namespace v8 { |
24 | 20 |
25 | 21 |
26 // If the buffer ends in the middle of a UTF-8 sequence then we return | 22 // If the buffer ends in the middle of a UTF-8 sequence then we return |
27 // the length of the string up to but not including the incomplete UTF-8 | 23 // the length of the string up to but not including the incomplete UTF-8 |
28 // sequence. If the buffer ends with a valid UTF-8 sequence then we | 24 // sequence. If the buffer ends with a valid UTF-8 sequence then we |
29 // return the whole buffer. | 25 // return the whole buffer. |
30 static int LengthWithoutIncompleteUtf8(char* buffer, int len) { | 26 static int LengthWithoutIncompleteUtf8(char* buffer, int len) { |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 FunctionTemplate::New(isolate, UnsetEnvironment)); | 705 FunctionTemplate::New(isolate, UnsetEnvironment)); |
710 os_templ->Set(String::NewFromUtf8(isolate, "umask"), | 706 os_templ->Set(String::NewFromUtf8(isolate, "umask"), |
711 FunctionTemplate::New(isolate, SetUMask)); | 707 FunctionTemplate::New(isolate, SetUMask)); |
712 os_templ->Set(String::NewFromUtf8(isolate, "mkdirp"), | 708 os_templ->Set(String::NewFromUtf8(isolate, "mkdirp"), |
713 FunctionTemplate::New(isolate, MakeDirectory)); | 709 FunctionTemplate::New(isolate, MakeDirectory)); |
714 os_templ->Set(String::NewFromUtf8(isolate, "rmdir"), | 710 os_templ->Set(String::NewFromUtf8(isolate, "rmdir"), |
715 FunctionTemplate::New(isolate, RemoveDirectory)); | 711 FunctionTemplate::New(isolate, RemoveDirectory)); |
716 } | 712 } |
717 | 713 |
718 } // namespace v8 | 714 } // namespace v8 |
OLD | NEW |