OLD | NEW |
1 // Copyright 2007-2011 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2011 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 | 660 |
661 TEST(Regress1433) { | 661 TEST(Regress1433) { |
662 for (int i = 0; i < 10; i++) { | 662 for (int i = 0; i < 10; i++) { |
663 v8::Isolate* isolate = v8::Isolate::New(); | 663 v8::Isolate* isolate = v8::Isolate::New(); |
664 { | 664 { |
665 v8::Locker lock(isolate); | 665 v8::Locker lock(isolate); |
666 v8::Isolate::Scope isolate_scope(isolate); | 666 v8::Isolate::Scope isolate_scope(isolate); |
667 v8::HandleScope handle_scope(isolate); | 667 v8::HandleScope handle_scope(isolate); |
668 v8::Handle<Context> context = v8::Context::New(isolate); | 668 v8::Handle<Context> context = v8::Context::New(isolate); |
669 v8::Context::Scope context_scope(context); | 669 v8::Context::Scope context_scope(context); |
670 v8::Handle<String> source = v8::String::New("1+1"); | 670 v8::Handle<String> source = v8::String::NewFromUtf8(isolate, "1+1"); |
671 v8::Handle<Script> script = v8::Script::Compile(source); | 671 v8::Handle<Script> script = v8::Script::Compile(source); |
672 v8::Handle<Value> result = script->Run(); | 672 v8::Handle<Value> result = script->Run(); |
673 v8::String::Utf8Value utf8(result); | 673 v8::String::Utf8Value utf8(result); |
674 } | 674 } |
675 isolate->Dispose(); | 675 isolate->Dispose(); |
676 } | 676 } |
677 } | 677 } |
678 | 678 |
679 | 679 |
680 static const char* kSimpleExtensionSource = | 680 static const char* kSimpleExtensionSource = |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 kSimpleExtensionSource)); | 734 kSimpleExtensionSource)); |
735 const char* extension_names[] = { "test0", "test1", | 735 const char* extension_names[] = { "test0", "test1", |
736 "test2", "test3", "test4", | 736 "test2", "test3", "test4", |
737 "test5", "test6", "test7" }; | 737 "test5", "test6", "test7" }; |
738 i::List<JoinableThread*> threads(kNThreads); | 738 i::List<JoinableThread*> threads(kNThreads); |
739 for (int i = 0; i < kNThreads; i++) { | 739 for (int i = 0; i < kNThreads; i++) { |
740 threads.Add(new IsolateGenesisThread(8, extension_names)); | 740 threads.Add(new IsolateGenesisThread(8, extension_names)); |
741 } | 741 } |
742 StartJoinAndDeleteThreads(threads); | 742 StartJoinAndDeleteThreads(threads); |
743 } | 743 } |
OLD | NEW |