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

Side by Side Diff: test/cctest/test-api.cc

Issue 10914317: Fix casting error for receiver of interceptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moar consistency. Created 8 years, 3 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/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17451 matching lines...) Expand 10 before | Expand all | Expand 10 after
17462 17462
17463 // Compile a try-finally clause where the finally block causes a GC 17463 // Compile a try-finally clause where the finally block causes a GC
17464 // while there still is a message pending for external reporting. 17464 // while there still is a message pending for external reporting.
17465 TryCatch try_catch; 17465 TryCatch try_catch;
17466 try_catch.SetVerbose(true); 17466 try_catch.SetVerbose(true);
17467 CompileRun("try { throw new Error(); } finally { gc(); }"); 17467 CompileRun("try { throw new Error(); } finally { gc(); }");
17468 CHECK(try_catch.HasCaught()); 17468 CHECK(try_catch.HasCaught());
17469 } 17469 }
17470 17470
17471 17471
17472 THREADED_TEST(Regress149912) {
17473 v8::HandleScope scope;
17474 LocalContext context;
17475 Handle<FunctionTemplate> templ = FunctionTemplate::New();
17476 AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter);
17477 context->Global()->Set(v8_str("Bug"), templ->GetFunction());
17478 CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();");
17479 }
17480
17481
17472 #ifndef WIN32 17482 #ifndef WIN32
17473 class ThreadInterruptTest { 17483 class ThreadInterruptTest {
17474 public: 17484 public:
17475 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } 17485 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { }
17476 ~ThreadInterruptTest() { delete sem_; } 17486 ~ThreadInterruptTest() { delete sem_; }
17477 17487
17478 void RunTest() { 17488 void RunTest() {
17479 sem_ = i::OS::CreateSemaphore(0); 17489 sem_ = i::OS::CreateSemaphore(0);
17480 17490
17481 InterruptThread i_thread(this); 17491 InterruptThread i_thread(this);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
17525 17535
17526 i::Semaphore* sem_; 17536 i::Semaphore* sem_;
17527 volatile int sem_value_; 17537 volatile int sem_value_;
17528 }; 17538 };
17529 17539
17530 17540
17531 THREADED_TEST(SemaphoreInterruption) { 17541 THREADED_TEST(SemaphoreInterruption) {
17532 ThreadInterruptTest().RunTest(); 17542 ThreadInterruptTest().RunTest();
17533 } 17543 }
17534 #endif // WIN32 17544 #endif // WIN32
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698