michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 459389; michael@0: var summary = 'Do not crash with JIT'; michael@0: var actual = ''; michael@0: var expect = ''; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: print('mmmm, food!'); michael@0: michael@0: jit(true); michael@0: michael@0: var SNI = {}; michael@0: SNI.MetaData={}; michael@0: SNI.MetaData.Parameter=function() michael@0: { michael@0: var parameters={}; michael@0: this.addParameter=function(key,value) michael@0: { michael@0: parameters[key]=[]; michael@0: parameters[key].push(value); michael@0: }; michael@0: this.getParameter=function(key,separator){ michael@0: if(!parameters[key]) michael@0: { michael@0: return; michael@0: } michael@0: return parameters[key].join(separator); michael@0: }; michael@0: this.getKeys=function() michael@0: { michael@0: return parameters; michael@0: }; michael@0: }; michael@0: SNI.MetaData.Manager=function(){ michael@0: var m=new SNI.MetaData.Parameter(); michael@0: this.getParameter=m.getParameter; michael@0: }; michael@0: var MetaDataManager=SNI.MetaData.Manager; michael@0: SNI.Ads={ }; michael@0: SNI.Ads.Url=function(){ michael@0: var p=new SNI.MetaData.Parameter(); michael@0: this.addParameter=p.addParameter; michael@0: this.getParameter=p.getParameter; michael@0: }; michael@0: function Ad() { michael@0: var url=new SNI.Ads.Url(); michael@0: this.addParameter=url.addParameter; michael@0: this.getParameter=url.getParameter; michael@0: } michael@0: function DartAd() michael@0: AdUrl.prototype=new Ad(); michael@0: function AdUrl() { } michael@0: function AdRestriction() { michael@0: var p=new SNI.MetaData.Parameter(); michael@0: this.addParameter=p.addParameter; michael@0: this.getParameter=p.getParameter; michael@0: this.getKeys=p.getKeys; michael@0: } michael@0: function AdRestrictionManager(){ michael@0: this.restriction=[]; michael@0: this.isActive=isActive; michael@0: this.isMatch=isMatch; michael@0: this.startMatch=startMatch; michael@0: function isActive(ad,mdm){ michael@0: var value=false; michael@0: for(var i=0;i