| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 count_(count), | 679 count_(count), |
| 680 extension_names_(extension_names) | 680 extension_names_(extension_names) |
| 681 {} | 681 {} |
| 682 | 682 |
| 683 virtual void Run() { | 683 virtual void Run() { |
| 684 v8::Isolate::CreateParams create_params; | 684 v8::Isolate::CreateParams create_params; |
| 685 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); | 685 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); |
| 686 v8::Isolate* isolate = v8::Isolate::New(create_params); | 686 v8::Isolate* isolate = v8::Isolate::New(create_params); |
| 687 { | 687 { |
| 688 v8::Isolate::Scope isolate_scope(isolate); | 688 v8::Isolate::Scope isolate_scope(isolate); |
| 689 CHECK( | |
| 690 !reinterpret_cast<i::Isolate*>(isolate)->has_installed_extensions()); | |
| 691 v8::ExtensionConfiguration extensions(count_, extension_names_); | 689 v8::ExtensionConfiguration extensions(count_, extension_names_); |
| 692 v8::HandleScope handle_scope(isolate); | 690 v8::HandleScope handle_scope(isolate); |
| 693 v8::Context::New(isolate, &extensions); | 691 v8::Context::New(isolate, &extensions); |
| 694 CHECK(reinterpret_cast<i::Isolate*>(isolate)->has_installed_extensions()); | |
| 695 } | 692 } |
| 696 isolate->Dispose(); | 693 isolate->Dispose(); |
| 697 } | 694 } |
| 698 | 695 |
| 699 private: | 696 private: |
| 700 int count_; | 697 int count_; |
| 701 const char** extension_names_; | 698 const char** extension_names_; |
| 702 }; | 699 }; |
| 703 | 700 |
| 704 | 701 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 732 kSimpleExtensionSource)); | 729 kSimpleExtensionSource)); |
| 733 const char* extension_names[] = { "test0", "test1", | 730 const char* extension_names[] = { "test0", "test1", |
| 734 "test2", "test3", "test4", | 731 "test2", "test3", "test4", |
| 735 "test5", "test6", "test7" }; | 732 "test5", "test6", "test7" }; |
| 736 i::List<JoinableThread*> threads(kNThreads); | 733 i::List<JoinableThread*> threads(kNThreads); |
| 737 for (int i = 0; i < kNThreads; i++) { | 734 for (int i = 0; i < kNThreads; i++) { |
| 738 threads.Add(new IsolateGenesisThread(8, extension_names)); | 735 threads.Add(new IsolateGenesisThread(8, extension_names)); |
| 739 } | 736 } |
| 740 StartJoinAndDeleteThreads(threads); | 737 StartJoinAndDeleteThreads(threads); |
| 741 } | 738 } |
| OLD | NEW |