| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 21815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21826 v8::V8::TerminateExecution(isolate_); | 21826 v8::V8::TerminateExecution(isolate_); |
| 21827 } | 21827 } |
| 21828 | 21828 |
| 21829 private: | 21829 private: |
| 21830 v8::Isolate* isolate_; | 21830 v8::Isolate* isolate_; |
| 21831 }; | 21831 }; |
| 21832 | 21832 |
| 21833 | 21833 |
| 21834 TEST(FutexInterruption) { | 21834 TEST(FutexInterruption) { |
| 21835 i::FLAG_harmony_sharedarraybuffer = true; | 21835 i::FLAG_harmony_sharedarraybuffer = true; |
| 21836 i::FLAG_harmony_atomics = true; | |
| 21837 v8::Isolate* isolate = CcTest::isolate(); | 21836 v8::Isolate* isolate = CcTest::isolate(); |
| 21838 v8::HandleScope scope(isolate); | 21837 v8::HandleScope scope(isolate); |
| 21839 LocalContext env; | 21838 LocalContext env; |
| 21840 | 21839 |
| 21841 FutexInterruptionThread timeout_thread(isolate); | 21840 FutexInterruptionThread timeout_thread(isolate); |
| 21842 | 21841 |
| 21843 v8::TryCatch try_catch(CcTest::isolate()); | 21842 v8::TryCatch try_catch(CcTest::isolate()); |
| 21844 timeout_thread.Start(); | 21843 timeout_thread.Start(); |
| 21845 | 21844 |
| 21846 CompileRun( | 21845 CompileRun( |
| 21847 "var ab = new SharedArrayBuffer(4);" | 21846 "var ab = new SharedArrayBuffer(4);" |
| 21848 "var i32a = new Int32Array(ab);" | 21847 "var i32a = new Int32Array(ab);" |
| 21849 "Atomics.futexWait(i32a, 0, 0);"); | 21848 "Atomics.futexWait(i32a, 0, 0);"); |
| 21850 CHECK(try_catch.HasTerminated()); | 21849 CHECK(try_catch.HasTerminated()); |
| 21851 timeout_thread.Join(); | 21850 timeout_thread.Join(); |
| 21852 } | 21851 } |
| 21853 | 21852 |
| 21854 | 21853 |
| 21855 TEST(EstimatedContextSize) { | 21854 TEST(EstimatedContextSize) { |
| 21856 v8::Isolate* isolate = CcTest::isolate(); | 21855 v8::Isolate* isolate = CcTest::isolate(); |
| 21857 v8::HandleScope scope(isolate); | 21856 v8::HandleScope scope(isolate); |
| 21858 LocalContext env; | 21857 LocalContext env; |
| 21859 CHECK(50000 < env->EstimatedSize()); | 21858 CHECK(50000 < env->EstimatedSize()); |
| 21860 } | 21859 } |
| OLD | NEW |