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 16838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16849 | 16849 |
16850 // Turn monomorphic on slow object with native accessor, then just | 16850 // Turn monomorphic on slow object with native accessor, then just |
16851 // delete the property and fail. | 16851 // delete the property and fail. |
16852 CompileRun("function f(x) { return x.foo; }" | 16852 CompileRun("function f(x) { return x.foo; }" |
16853 "%OptimizeObjectForAddingMultipleProperties(obj, 1);" | 16853 "%OptimizeObjectForAddingMultipleProperties(obj, 1);" |
16854 "obj.__proto__ = null;" | 16854 "obj.__proto__ = null;" |
16855 "f(obj); f(obj); delete obj.foo;" | 16855 "f(obj); f(obj); delete obj.foo;" |
16856 "var result = f(obj);"); | 16856 "var result = f(obj);"); |
16857 CHECK(context->Global()->Get(v8_str("result"))->IsUndefined()); | 16857 CHECK(context->Global()->Get(v8_str("result"))->IsUndefined()); |
16858 } | 16858 } |
| 16859 |
| 16860 |
| 16861 THREADED_TEST(Regress137496) { |
| 16862 i::FLAG_expose_gc = true; |
| 16863 v8::HandleScope scope; |
| 16864 LocalContext context; |
| 16865 |
| 16866 // Compile a try-finally clause where the finally block causes a GC |
| 16867 // while there still is a message pending for external reporting. |
| 16868 TryCatch try_catch; |
| 16869 try_catch.SetVerbose(true); |
| 16870 CompileRun("try { throw new Error(); } finally { gc(); }"); |
| 16871 CHECK(try_catch.HasCaught()); |
| 16872 } |
OLD | NEW |