hasBailedOutBug.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. var shouldBailout = false;
  6. function test0() {
  7. var obj0 = {};
  8. var func0 = function () {
  9. };
  10. var func1 = function () {
  11. (function () {
  12. 'use strict';
  13. try {
  14. function func8() {
  15. obj0.prop2;
  16. }
  17. var uniqobj4 = func8();
  18. } catch (ex) {
  19. return 'somestring';
  20. } finally {
  21. }
  22. func0(ary.push(ary.unshift(Object.prototype.length = protoObj0)));
  23. }(shouldBailout ? (Object.defineProperty(Object.prototype, 'length', {
  24. get: function () {
  25. }
  26. })) : arguments));
  27. };
  28. var ary = Array();
  29. var protoObj0 = Object();
  30. ({
  31. prop7: shouldBailout ? (Object.defineProperty(obj0, 'prop2', {
  32. set: function () {
  33. }
  34. })) : Object
  35. });
  36. for (; func1(); ) {
  37. }
  38. }
  39. test0();
  40. test0();
  41. shouldBailout = true;
  42. try {
  43. test0();
  44. }
  45. catch(ex) {
  46. print(ex);
  47. }