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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
600 v8::Locker locker_; | 600 v8::Locker locker_; |
601 v8::HandleScope handle_scope; | 601 v8::HandleScope handle_scope; |
602 context = v8::Context::New(); | 602 context = v8::Context::New(); |
603 } | 603 } |
604 i::List<JoinableThread*> threads(kNThreads); | 604 i::List<JoinableThread*> threads(kNThreads); |
605 for (int i = 0; i < kNThreads; i++) { | 605 for (int i = 0; i < kNThreads; i++) { |
606 threads.Add(new LockUnlockLockDefaultIsolateThread(context)); | 606 threads.Add(new LockUnlockLockDefaultIsolateThread(context)); |
607 } | 607 } |
608 StartJoinAndDeleteThreads(threads); | 608 StartJoinAndDeleteThreads(threads); |
609 } | 609 } |
610 | |
611 | |
612 TEST(Regress1433) { | |
613 for (int i = 0; i < 10; i++) { | |
614 v8::Isolate* isolate = v8::Isolate::New(); | |
615 { | |
616 v8::Locker l(isolate); | |
Mads Ager (chromium)
2011/06/07 18:28:18
l -> lock?
Vitaly Repeshko
2011/06/07 18:32:53
Done.
| |
617 v8::Isolate::Scope iscope(isolate); | |
Mads Ager (chromium)
2011/06/07 18:28:18
iscope -> isolate_scope
to match the other naming
Vitaly Repeshko
2011/06/07 18:32:53
Done.
| |
618 v8::HandleScope handle_scope; | |
619 v8::Persistent<Context> context = v8::Context::New(); | |
620 v8::Context::Scope context_scope(context); | |
621 v8::Handle<String> source = v8::String::New("1+1"); | |
622 v8::Handle<Script> script = v8::Script::Compile(source); | |
623 v8::Handle<Value> result = script->Run(); | |
624 v8::String::AsciiValue ascii(result); | |
625 context.Dispose(); | |
626 } | |
627 isolate->Dispose(); | |
628 } | |
629 } | |
OLD | NEW |