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

Side by Side Diff: test/cctest/cctest.h

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/zone-inl.h ('k') | test/cctest/test-accessors.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // the tests alternate, not relying solely on the big V8 lock. 80 // the tests alternate, not relying solely on the big V8 lock.
81 // 81 //
82 // A test is augmented with calls to ApiTestFuzzer::Fuzz() in its 82 // A test is augmented with calls to ApiTestFuzzer::Fuzz() in its
83 // callbacks. This will have no effect when we are not running the 83 // callbacks. This will have no effect when we are not running the
84 // thread fuzzing test. In the thread fuzzing test it will 84 // thread fuzzing test. In the thread fuzzing test it will
85 // pseudorandomly select a successor thread and switch execution 85 // pseudorandomly select a successor thread and switch execution
86 // to that thread, suspending the current test. 86 // to that thread, suspending the current test.
87 class ApiTestFuzzer: public v8::internal::Thread { 87 class ApiTestFuzzer: public v8::internal::Thread {
88 public: 88 public:
89 void CallTest(); 89 void CallTest();
90 explicit ApiTestFuzzer(int num) 90 explicit ApiTestFuzzer(v8::internal::Isolate* isolate, int num)
91 : test_number_(num), 91 : Thread(isolate),
92 test_number_(num),
92 gate_(v8::internal::OS::CreateSemaphore(0)), 93 gate_(v8::internal::OS::CreateSemaphore(0)),
93 active_(true) { 94 active_(true) {
94 } 95 }
95 ~ApiTestFuzzer() { delete gate_; } 96 ~ApiTestFuzzer() { delete gate_; }
96 97
97 // The ApiTestFuzzer is also a Thread, so it has a Run method. 98 // The ApiTestFuzzer is also a Thread, so it has a Run method.
98 virtual void Run(); 99 virtual void Run();
99 100
100 enum PartOfTest { FIRST_PART, SECOND_PART }; 101 enum PartOfTest { FIRST_PART, SECOND_PART };
101 102
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 203 }
203 204
204 205
205 // Helper function that compiles and runs the source. 206 // Helper function that compiles and runs the source.
206 static inline v8::Local<v8::Value> CompileRun(const char* source) { 207 static inline v8::Local<v8::Value> CompileRun(const char* source) {
207 return v8::Script::Compile(v8::String::New(source))->Run(); 208 return v8::Script::Compile(v8::String::New(source))->Run();
208 } 209 }
209 210
210 211
211 #endif // ifndef CCTEST_H_ 212 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/zone-inl.h ('k') | test/cctest/test-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698