| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 args.GetIsolate()->ThrowException( | 716 args.GetIsolate()->ThrowException( |
| 717 String::NewFromUtf8(args.GetIsolate(), message)); | 717 String::NewFromUtf8(args.GetIsolate(), message)); |
| 718 return; | 718 return; |
| 719 } | 719 } |
| 720 unsetenv(*var); | 720 unsetenv(*var); |
| 721 } | 721 } |
| 722 | 722 |
| 723 | 723 |
| 724 void Shell::AddOSMethods(Isolate* isolate, Handle<ObjectTemplate> os_templ) { | 724 void Shell::AddOSMethods(Isolate* isolate, Handle<ObjectTemplate> os_templ) { |
| 725 os_templ->Set(String::NewFromUtf8(isolate, "system"), | 725 os_templ->Set(String::NewFromUtf8(isolate, "system"), |
| 726 FunctionTemplate::New(System)); | 726 FunctionTemplate::New(isolate, System)); |
| 727 os_templ->Set(String::NewFromUtf8(isolate, "chdir"), | 727 os_templ->Set(String::NewFromUtf8(isolate, "chdir"), |
| 728 FunctionTemplate::New(ChangeDirectory)); | 728 FunctionTemplate::New(isolate, ChangeDirectory)); |
| 729 os_templ->Set(String::NewFromUtf8(isolate, "setenv"), | 729 os_templ->Set(String::NewFromUtf8(isolate, "setenv"), |
| 730 FunctionTemplate::New(SetEnvironment)); | 730 FunctionTemplate::New(isolate, SetEnvironment)); |
| 731 os_templ->Set(String::NewFromUtf8(isolate, "unsetenv"), | 731 os_templ->Set(String::NewFromUtf8(isolate, "unsetenv"), |
| 732 FunctionTemplate::New(UnsetEnvironment)); | 732 FunctionTemplate::New(isolate, UnsetEnvironment)); |
| 733 os_templ->Set(String::NewFromUtf8(isolate, "umask"), | 733 os_templ->Set(String::NewFromUtf8(isolate, "umask"), |
| 734 FunctionTemplate::New(SetUMask)); | 734 FunctionTemplate::New(isolate, SetUMask)); |
| 735 os_templ->Set(String::NewFromUtf8(isolate, "mkdirp"), | 735 os_templ->Set(String::NewFromUtf8(isolate, "mkdirp"), |
| 736 FunctionTemplate::New(MakeDirectory)); | 736 FunctionTemplate::New(isolate, MakeDirectory)); |
| 737 os_templ->Set(String::NewFromUtf8(isolate, "rmdir"), | 737 os_templ->Set(String::NewFromUtf8(isolate, "rmdir"), |
| 738 FunctionTemplate::New(RemoveDirectory)); | 738 FunctionTemplate::New(isolate, RemoveDirectory)); |
| 739 } | 739 } |
| 740 | 740 |
| 741 } // namespace v8 | 741 } // namespace v8 |
| OLD | NEW |