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 5128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5139 // Force the list of returned keys to be stored in a Arguments object. | 5139 // Force the list of returned keys to be stored in a Arguments object. |
5140 Local<Script> indexed_property_names_script = Script::Compile(v8_str( | 5140 Local<Script> indexed_property_names_script = Script::Compile(v8_str( |
5141 "function f(w,x) {" | 5141 "function f(w,x) {" |
5142 " return arguments;" | 5142 " return arguments;" |
5143 "}" | 5143 "}" |
5144 "keys = f(0, 1, 2, 3);" | 5144 "keys = f(0, 1, 2, 3);" |
5145 "keys;")); | 5145 "keys;")); |
5146 Local<Object> result = | 5146 Local<Object> result = |
5147 Local<Object>::Cast(indexed_property_names_script->Run()); | 5147 Local<Object>::Cast(indexed_property_names_script->Run()); |
5148 // Have to populate the handle manually, as it's not Cast-able. | 5148 // Have to populate the handle manually, as it's not Cast-able. |
5149 Local<v8::Array> array_result; | 5149 i::Handle<i::JSObject> o = |
5150 Object** ptr = reinterpret_cast<Object**>(&array_result); | 5150 v8::Utils::OpenHandle<Object, i::JSObject>(result); |
5151 *ptr = *reinterpret_cast<Object**>(&result); | 5151 i::Handle<i::JSArray> array(reinterpret_cast<i::JSArray*>(*o)); |
5152 return array_result; | 5152 return v8::Utils::ToLocal(array); |
5153 } | 5153 } |
5154 | 5154 |
5155 | 5155 |
5156 static v8::Handle<Value> NonStrictIndexedPropertyGetter( | 5156 static v8::Handle<Value> NonStrictIndexedPropertyGetter( |
5157 uint32_t index, | 5157 uint32_t index, |
5158 const AccessorInfo& info) { | 5158 const AccessorInfo& info) { |
5159 ApiTestFuzzer::Fuzz(); | 5159 ApiTestFuzzer::Fuzz(); |
5160 if (index < 4) { | 5160 if (index < 4) { |
5161 return v8::Handle<Value>(v8_num(index)); | 5161 return v8::Handle<Value>(v8_num(index)); |
5162 } | 5162 } |
(...skipping 14207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19370 i::Semaphore* sem_; | 19370 i::Semaphore* sem_; |
19371 volatile int sem_value_; | 19371 volatile int sem_value_; |
19372 }; | 19372 }; |
19373 | 19373 |
19374 | 19374 |
19375 THREADED_TEST(SemaphoreInterruption) { | 19375 THREADED_TEST(SemaphoreInterruption) { |
19376 ThreadInterruptTest().RunTest(); | 19376 ThreadInterruptTest().RunTest(); |
19377 } | 19377 } |
19378 | 19378 |
19379 #endif // WIN32 | 19379 #endif // WIN32 |
OLD | NEW |