Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: src/d8-posix.cc

Issue 12716010: Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback. Rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/d8-debug.cc ('k') | src/d8-readline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 443
444 #endif // No waitid call. 444 #endif // No waitid call.
445 445
446 return true; 446 return true;
447 } 447 }
448 448
449 449
450 // Implementation of the system() function (see d8.h for details). 450 // Implementation of the system() function (see d8.h for details).
451 Handle<Value> Shell::System(const Arguments& args) { 451 Handle<Value> Shell::System(const Arguments& args) {
452 HandleScope scope; 452 HandleScope scope(args.GetIsolate());
453 int read_timeout = -1; 453 int read_timeout = -1;
454 int total_timeout = -1; 454 int total_timeout = -1;
455 if (!GetTimeouts(args, &read_timeout, &total_timeout)) return v8::Undefined(); 455 if (!GetTimeouts(args, &read_timeout, &total_timeout)) return v8::Undefined();
456 Handle<Array> command_args; 456 Handle<Array> command_args;
457 if (args.Length() > 1) { 457 if (args.Length() > 1) {
458 if (!args[1]->IsArray()) { 458 if (!args[1]->IsArray()) {
459 return ThrowException(String::New("system: Argument 2 must be an array")); 459 return ThrowException(String::New("system: Argument 2 must be an array"));
460 } 460 }
461 command_args = Handle<Array>::Cast(args[1]); 461 command_args = Handle<Array>::Cast(args[1]);
462 } else { 462 } else {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 os_templ->Set(String::New("chdir"), FunctionTemplate::New(ChangeDirectory)); 679 os_templ->Set(String::New("chdir"), FunctionTemplate::New(ChangeDirectory));
680 os_templ->Set(String::New("setenv"), FunctionTemplate::New(SetEnvironment)); 680 os_templ->Set(String::New("setenv"), FunctionTemplate::New(SetEnvironment));
681 os_templ->Set(String::New("unsetenv"), 681 os_templ->Set(String::New("unsetenv"),
682 FunctionTemplate::New(UnsetEnvironment)); 682 FunctionTemplate::New(UnsetEnvironment));
683 os_templ->Set(String::New("umask"), FunctionTemplate::New(SetUMask)); 683 os_templ->Set(String::New("umask"), FunctionTemplate::New(SetUMask));
684 os_templ->Set(String::New("mkdirp"), FunctionTemplate::New(MakeDirectory)); 684 os_templ->Set(String::New("mkdirp"), FunctionTemplate::New(MakeDirectory));
685 os_templ->Set(String::New("rmdir"), FunctionTemplate::New(RemoveDirectory)); 685 os_templ->Set(String::New("rmdir"), FunctionTemplate::New(RemoveDirectory));
686 } 686 }
687 687
688 } // namespace v8 688 } // namespace v8
OLDNEW
« no previous file with comments | « src/d8-debug.cc ('k') | src/d8-readline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698