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 17427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17438 THREADED_TEST(Regress149912) { | 17438 THREADED_TEST(Regress149912) { |
17439 v8::HandleScope scope; | 17439 v8::HandleScope scope; |
17440 LocalContext context; | 17440 LocalContext context; |
17441 Handle<FunctionTemplate> templ = FunctionTemplate::New(); | 17441 Handle<FunctionTemplate> templ = FunctionTemplate::New(); |
17442 AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter); | 17442 AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter); |
17443 context->Global()->Set(v8_str("Bug"), templ->GetFunction()); | 17443 context->Global()->Set(v8_str("Bug"), templ->GetFunction()); |
17444 CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();"); | 17444 CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();"); |
17445 } | 17445 } |
17446 | 17446 |
17447 | 17447 |
| 17448 THREADED_TEST(Regress157124) { |
| 17449 v8::HandleScope scope; |
| 17450 LocalContext context; |
| 17451 Local<ObjectTemplate> templ = ObjectTemplate::New(); |
| 17452 Local<Object> obj = templ->NewInstance(); |
| 17453 obj->GetIdentityHash(); |
| 17454 obj->DeleteHiddenValue(v8_str("Bug")); |
| 17455 } |
| 17456 |
| 17457 |
17448 #ifndef WIN32 | 17458 #ifndef WIN32 |
17449 class ThreadInterruptTest { | 17459 class ThreadInterruptTest { |
17450 public: | 17460 public: |
17451 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } | 17461 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } |
17452 ~ThreadInterruptTest() { delete sem_; } | 17462 ~ThreadInterruptTest() { delete sem_; } |
17453 | 17463 |
17454 void RunTest() { | 17464 void RunTest() { |
17455 sem_ = i::OS::CreateSemaphore(0); | 17465 sem_ = i::OS::CreateSemaphore(0); |
17456 | 17466 |
17457 InterruptThread i_thread(this); | 17467 InterruptThread i_thread(this); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17501 | 17511 |
17502 i::Semaphore* sem_; | 17512 i::Semaphore* sem_; |
17503 volatile int sem_value_; | 17513 volatile int sem_value_; |
17504 }; | 17514 }; |
17505 | 17515 |
17506 | 17516 |
17507 THREADED_TEST(SemaphoreInterruption) { | 17517 THREADED_TEST(SemaphoreInterruption) { |
17508 ThreadInterruptTest().RunTest(); | 17518 ThreadInterruptTest().RunTest(); |
17509 } | 17519 } |
17510 #endif // WIN32 | 17520 #endif // WIN32 |
OLD | NEW |