OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* ***** BEGIN LICENSE BLOCK ***** |
| 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 4 * |
| 5 * The contents of this file are subject to the Mozilla Public License Version |
| 6 * 1.1 (the "License"); you may not use this file except in compliance with |
| 7 * the License. You may obtain a copy of the License at |
| 8 * http://www.mozilla.org/MPL/ |
| 9 * |
| 10 * Software distributed under the License is distributed on an "AS IS" basis, |
| 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| 12 * for the specific language governing rights and limitations under the |
| 13 * License. |
| 14 * |
| 15 * The Original Code is JavaScript Engine testing utilities. |
| 16 * |
| 17 * The Initial Developer of the Original Code is |
| 18 * Mozilla Foundation. |
| 19 * Portions created by the Initial Developer are Copyright (C) 2008 |
| 20 * the Initial Developer. All Rights Reserved. |
| 21 * |
| 22 * Contributor(s): Rob Sayre |
| 23 * |
| 24 * Alternatively, the contents of this file may be used under the terms of |
| 25 * either the GNU General Public License Version 2 or later (the "GPL"), or |
| 26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
| 27 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 28 * of those above. If you wish to allow use of your version of this file only |
| 29 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 30 * use your version of this file under the terms of the MPL, indicate your |
| 31 * decision by deleting the provisions above and replace them with the notice |
| 32 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 33 * the provisions above, a recipient may use your version of this file under |
| 34 * the terms of any one of the MPL, the GPL or the LGPL. |
| 35 * |
| 36 * ***** END LICENSE BLOCK ***** */ |
| 37 |
| 38 var gTestfile = 'regress-449627.js'; |
| 39 //----------------------------------------------------------------------------- |
| 40 var BUGNUMBER = 449627; |
| 41 var summary = 'Crash with JIT in js_FillPropertyCache'; |
| 42 var actual = 'No Crash'; |
| 43 var expect = 'No Crash'; |
| 44 |
| 45 printBugNumber(BUGNUMBER); |
| 46 printStatus (summary); |
| 47 |
| 48 jit(true); |
| 49 |
| 50 /************************ BROWSER DETECT (http://www.quirksmode.org/js/detect.ht
ml) ************************/ |
| 51 |
| 52 if (typeof navigator == 'undefined') |
| 53 { |
| 54 navigator = { |
| 55 userAgent: "Firefox", |
| 56 vendor: "Mozilla", |
| 57 platform: "Mac" |
| 58 }; |
| 59 } |
| 60 |
| 61 global = this; |
| 62 |
| 63 var BrowserDetect = { |
| 64 init: function _init() |
| 65 { |
| 66 this.browser=this.searchString(this.dataBrowser) || "An unknown browser"; |
| 67 |
| 68 this.OS= this.searchString(this.dataOS)||"an unknown OS"; |
| 69 }, |
| 70 searchString: function _searchString(a) |
| 71 { |
| 72 for(var i=0; i < a.length; i++) |
| 73 { |
| 74 var b=a[i].string; |
| 75 var c=a[i].prop; |
| 76 this.versionSearchString=a[i].versionSearch||a[i].identity; |
| 77 if(b) |
| 78 { |
| 79 if(b.indexOf(a[i].subString)!=-1) |
| 80 return a[i].identity; |
| 81 } |
| 82 else if(c) |
| 83 return a[i].identity; |
| 84 } |
| 85 }, |
| 86 |
| 87 searchVersion:function _searchVersion(a) |
| 88 { |
| 89 var b=a.indexOf(this.versionSearchString); |
| 90 if(b==-1) |
| 91 return; |
| 92 return parseFloat(a.substring(b+this.versionSearchString.length+1)); |
| 93 }, |
| 94 |
| 95 dataBrowser:[ |
| 96 { |
| 97 string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",
identity:"OmniWeb" |
| 98 }, |
| 99 { |
| 100 string:navigator.vendor,subString:"Apple",identity:"Safari" |
| 101 }, |
| 102 { |
| 103 prop:global.opera,identity:"Opera" |
| 104 }, |
| 105 { |
| 106 string:navigator.vendor,subString:"iCab",identity:"iCab" |
| 107 }, |
| 108 { |
| 109 string:navigator.vendor,subString:"KDE",identity:"Konqueror" |
| 110 }, |
| 111 { |
| 112 string:navigator.userAgent,subString:"Firefox",identity:"Firefox" |
| 113 }, |
| 114 { |
| 115 string:navigator.vendor,subString:"Camino",identity:"Camino" |
| 116 }, |
| 117 { |
| 118 string:navigator.userAgent,subString:"Netscape",identity:"Netscape" |
| 119 }, |
| 120 { |
| 121 string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionS
earch:"MSIE" |
| 122 }, |
| 123 { |
| 124 string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionS
earch:"rv" |
| 125 }, |
| 126 { |
| 127 string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versi
onSearch:"Mozilla" |
| 128 } |
| 129 ], |
| 130 dataOS:[ |
| 131 { |
| 132 string:navigator.platform,subString:"Win",identity:"Windows" |
| 133 }, |
| 134 { |
| 135 string:navigator.platform,subString:"Mac",identity:"Mac" |
| 136 }, |
| 137 { |
| 138 string:navigator.platform,subString:"Linux",identity:"Linux" |
| 139 } |
| 140 ] |
| 141 }; |
| 142 |
| 143 BrowserDetect.init(); |
| 144 |
| 145 jit(false); |
| 146 |
| 147 reportCompare(expect, actual, summary); |
OLD | NEW |