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 17164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17175 v8::HandleScope scope; | 17175 v8::HandleScope scope; |
17176 LocalContext context; | 17176 LocalContext context; |
17177 | 17177 |
17178 // Compile a try-finally clause where the finally block causes a GC | 17178 // Compile a try-finally clause where the finally block causes a GC |
17179 // while there still is a message pending for external reporting. | 17179 // while there still is a message pending for external reporting. |
17180 TryCatch try_catch; | 17180 TryCatch try_catch; |
17181 try_catch.SetVerbose(true); | 17181 try_catch.SetVerbose(true); |
17182 CompileRun("try { throw new Error(); } finally { gc(); }"); | 17182 CompileRun("try { throw new Error(); } finally { gc(); }"); |
17183 CHECK(try_catch.HasCaught()); | 17183 CHECK(try_catch.HasCaught()); |
17184 } | 17184 } |
17185 | |
17186 | |
17187 THREADED_TEST(Regress149912) { | |
17188 v8::HandleScope scope; | |
17189 LocalContext context; | |
17190 Handle<FunctionTemplate> templ = FunctionTemplate::New(); | |
17191 AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter); | |
17192 context->Global()->Set(v8_str("Bug"), templ->GetFunction()); | |
17193 CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();"); | |
17194 } | |
OLD | NEW |