Lines Matching refs:MUST
143 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){this.parent=b;this.id=a;this.category=c;this.name=e;this.creationTs=f;this.creationTsWasExplicit=!1;this.deletionTs=Number.MAX_VALUE;this.selected=this.deletionTsWasExplicit=!1;this.colorId=0;this.bounds=new base.Range;this.snapshots=[];this.hasImplicitSnapshots=!1}d.prototype={__proto__:Object.prototype,get typeName(){return this.name},addSnapshot:function(b,a){if(b<this.creationTs)throw Error("Snapshots must be >= instance.creationTs");
144 if(b>=this.deletionTs)throw Error("Snapshots cannot be added after an objects deletion timestamp.");var c;if(0<this.snapshots.length){c=this.snapshots[this.snapshots.length-1];if(c.ts==b)throw Error("Snapshots already exists at this time!");if(b<c.ts)throw Error("Snapshots must be added in increasing timestamp order");}c=new (tracing.trace_model.ObjectSnapshot.getConstructor(this.name))(this,b,a);this.snapshots.push(c);return c},wasDeleted:function(b){var a;if(0<this.snapshots.length&&(a=this.snapshots[this.snapshots.length-
145 1],a.ts>b))throw Error("Instance cannot be deleted at ts="+b+". A snapshot exists that is older.");this.deletionTs=b;this.deletionTsWasExplicit=!0},preInitialize:function(){for(var b=0;b<this.snapshots.length;b++)this.snapshots[b].preInitialize()},initialize:function(){for(var b=0;b<this.snapshots.length;b++)this.snapshots[b].initialize()},getSnapshotAt:function(b){if(b<this.creationTs){if(this.creationTsWasExplicit)throw Error("ts must be within lifetime of this instance");return this.snapshots[0]}if(b>
146 this.deletionTs)throw Error("ts must be within lifetime of this instance");var a=this.snapshots;b=base.findLowIndexInSortedIntervals(a,function(a){return a.ts},function(c,b){return b==a.length-1?a[b].objectInstance.deletionTs:a[b+1].ts-a[b].ts},b);return 0>b?this.snapshots[0]:b>=this.snapshots.length?this.snapshots[this.snapshots.length-1]:this.snapshots[b]},updateBounds:function(){this.bounds.reset();this.bounds.addValue(this.creationTs);this.deletionTs!=Number.MAX_VALUE?this.bounds.addValue(this.deletionTs):
149 base.exportTo("tracing.trace_model",function(){function d(b,a,c){this.createObjectInstanceFunction_=b;this.parent=a;this.id=c;this.instances=[]}d.prototype={idWasCreated:function(b,a,c){if(0==this.instances.length)return this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,b,a,c)),this.instances[0].creationTsWasExplicit=!0,this.instances[0];var e=this.instances[this.instances.length-1];if(c<e.deletionTs)throw Error("Mutation of the TimeToObjectInstanceMap must be done in ascending timestamp order.");
166 1].start)throw Error("Slices must be added in increasing timestamp order");var g=tracing.getStringColorId(c);a=new this.sliceConstructor(a,c,g,b,f?f:{});this.openPartialSlices_.push(a);return a},isTimestampValidForBeginOrEnd:function(a){return this.openPartialSlices_.length?a>=this.openPartialSlices_[this.openPartialSlices_.length-1].start:!0},get openSliceCount(){return this.openPartialSlices_.length},get mostRecentlyOpenedPartialSlice(){return this.openPartialSlices_.length?this.openPartialSlices_[this.openPartialSlices_.length-
172 base.exportTo("tracing.trace_model",function(){function d(c,b,e,d,l,m){a.call(this,c,b,e,d,l,m);this.subSlices=[]}function b(a,b){this.guid_=base.GUID.allocate();if(!a)throw Error("Parent must be provided.");this.parent=a;this.sortIndex=0;this.tid=b;this.sliceGroup=new c(d);this.cpuSlices=void 0;this.samples_=[];this.kernelSliceGroup=new c;this.asyncSliceGroup=new e;this.bounds=new base.Range;this.ephemeralSettings={}}var a=tracing.trace_model.Slice,c=tracing.trace_model.SliceGroup,e=tracing.trace_model.AsyncSliceGroup;
173 d.prototype={__proto__:a.prototype};b.prototype={get guid(){return this.guid_},compareTo:function(a){return b.compare(this,a)},toJSON:function(){for(var a={},c=Object.keys(this),b=0;b<c.length;b++){var e=c[b];"function"!=typeof this[e]&&(a[e]="parent"==e?this[e].guid:this[e])}return a},addSample:function(a,c,b,e){if(this.samples_.length&&b<this.samples_[this.samples_.length-1].start)throw Error("Samples must be added in increasing timestamp order.");var d=tracing.getStringColorId(c);a=new tracing.trace_model.Sample(a,
179 base.exportTo("base",function(){function d(){return d}var b=localStorage;d.get=function(a,c,e){a=d.namespace_(a,e);var f=b.getItem(a);if(null===f||void 0===f)return c;try{return JSON.parse(f).value}catch(g){return b.removeItem(d.namespace_(a,e)),c}};d.set=function(a,c,e){if(void 0===c)throw Error("Settings.set: value must not be undefined");c=JSON.stringify({value:c});b.setItem(d.namespace_(a,e),c)};d.keys=function(a){var c=[];a=a||"";for(var e=0;e<b.length;e++){var f=b.key(e);d.isnamespaced_(f,a)&&
185 base.exportTo("tracing.trace_model",function(){function d(a){if(!a)throw Error("Must provide a model");this.guid_=base.GUID.allocate();this.model=a;this.threads={};this.counters={};this.objects=new tracing.trace_model.ObjectCollection(this);this.bounds=new base.Range;this.sortIndex=0;this.ephemeralSettings={}}var b=tracing.trace_model.Thread,a=tracing.trace_model.Counter;d.compare=function(a,b){return a.sortIndex-b.sortIndex};d.prototype={get guid(){return this.guid_},get numThreads(){var a=0,b;for(b in this.threads)a++;
190 base.exportTo("tracing.trace_model",function(){function d(c){if(void 0===c)throw Error("model must be provided");a.call(this,c);this.cpus={}}var b=tracing.trace_model.Cpu,a=tracing.trace_model.ProcessBase;d.compare=function(a,b){return 0};d.prototype={__proto__:a.prototype,compareTo:function(a){return d.compare(this,a)},get userFriendlyName(){return"Kernel"},get userFriendlyDetails(){return"Kernel"},getOrCreateCpu:function(a){this.cpus[a]||(this.cpus[a]=new b(a));return this.cpus[a]},shiftTimestampsForward:function(c){a.prototype.shiftTimestampsForward.call(this);
192 base.exportTo("tracing.trace_model",function(){function d(b,a){if(void 0===b)throw Error("model must be provided");if(void 0===a)throw Error("pid must be provided");tracing.trace_model.ProcessBase.call(this,b);this.pid=a;this.name=void 0;this.labels=[];this.instantEvents=[]}d.compare=function(b,a){var c=tracing.trace_model.ProcessBase.compare(b,a);return c||(c=base.comparePossiblyUndefinedValues(b.name,a.name,function(a,c){return a.localeCompare(c)}))?c:(c=base.compareArrays(b.labels,a.labels,function(a,
228 a.length)throw Error("Array must be 8 long");var c=new b;c.p1[0]=a[0];c.p1[1]=a[1];c.p2[0]=a[2];c.p2[1]=a[3];c.p3[0]=a[4];c.p3[1]=a[5];c.p4[0]=a[6];c.p4[1]=a[7];return c};b.prototype={vecInside:function(a){return c(a,this.p1,this.p2,this.p3)||c(a,this.p1,this.p3,this.p4)},boundingRect:function(){var a=Math.min(this.p1[0],this.p2[0],this.p3[0],this.p4[0]),c=Math.min(this.p1[1],this.p2[1],this.p3[1],this.p4[1]),b=Math.max(this.p1[0],this.p2[0],this.p3[0],this.p4[0]),e=Math.max(this.p1[1],this.p2[1],
249 a=a.parent;var b=c.ts/1E3,e;if("N"==c.ph)try{e=a.objects.idWasCreated(c.id,c.cat,c.name,b)}catch(f){this.model_.importErrors.push("While processing create of "+c.id+" at ts="+b+": "+f);return}else if("O"==c.ph){if(void 0===c.args.snapshot){this.model_.importErrors.push("While processing "+c.id+" at ts="+b+": Snapshots must have args: {snapshot: ...}");return}var g;try{g=a.objects.addSnapshot(c.id,c.cat,c.name,b,this.deepCopyIfNeeded_(c.args.snapshot))}catch(d){this.model_.importErrors.push("While processing snapshot of "+
251 createImplicitObjects_:function(){base.iterItems(this.model_.processes,function(a,c){this.createImplicitObjectsForProcess_(c)},this)},createImplicitObjectsForProcess_:function(a){function c(c,b,e,d){if(e&&void 0!==e.id&&!(e instanceof tracing.trace_model.ObjectSnapshot)){var l=e.id,m=/(.+)\/(.+)/.exec(l);if(!m)throw Error("Implicit snapshots must have names.");delete e.id;var n=m[1],m=m[2],p;try{p=a.objects.addSnapshot(m,d.objectInstance.category,n,d.ts,e)}catch(q){this.model_.importErrors.push("While processing implicit snapshot of "+
252 l+" at ts="+d.ts+": "+q);return}p.objectInstance.hasImplicitSnapshots=!0;p.containingSnapshot=d;c[b]=p;if(!(p instanceof tracing.trace_model.ObjectSnapshot))throw Error("Created object must be instanceof snapshot");return p.args}}function b(a,c,d,k){if(a instanceof Object)if(a instanceof Array)for(var l=0;l<a.length;l++){var m=c.call(k,a,l,a[l],d);m?b(m,c,d,k):b(a[l],c,d,k)}else for(l in a)(m=c.call(k,a,l,a[l],d))?b(m,c,d,k):b(a[l],c,d,k)}a.objects.iterObjectInstances(function(a){a.snapshots.forEach(function(a){if(void 0!==
289 base.exportTo("ui",function(){return{decorate:function(d,b){var a;a="string"==typeof d?base.doc.querySelectorAll(d):[d];for(var c=0,e;e=a[c];c++)e instanceof b||b.decorate(e)},define:function(d,b){function a(){if(b&&a.prototype.__proto__!=b.prototype)throw Error(d+" prototye's __proto__ field is messed up. It MUST be the prototype of "+b.tagName);var c=d;if(b)for(var e=b;e&&e.tagName;)c=e.tagName,e=e.parentConstructor;c=base.doc.createElement(c);a.decorate.call(this,c,arguments);return c}if("function"==
442 b,e,d,g){function h(d){d=n.selectedOptions[0].targetPropertyValue;base.Settings.set(e,d);a[b]=d}for(var k,l=0;l<g.length;l++){var m=g[l];if(m.value==d){k=l;break}}if(void 0===k)throw Error("defaultValue must be in the items list");var n=document.createElement("select");n.addEventListener("change",h);for(l=0;l<g.length;l++){var m=g[l],p=document.createElement("option");p.textContent=m.label;p.targetPropertyValue=m.value;n.appendChild(p)}a.__lookupSetter__("selectedIndex");n.__defineGetter__("selectedValue",
514 b+"px";this.targetSizesByModeKey_[this.modeKey_]=b},applyDelta_:function(b){var a=this.getTargetSize_();if(this.target_==this.nextSibling)b=a+b;else{if(this.target_!=this.previousSibling)throw Error("Must be next sibling");b=a-b}this.setTargetSize_(b)},onMouseMove_:function(b){var a=this.horizontal_?b.clientY:b.clientX;this.applyDelta_(this.lastMousePos_-a);this.lastMousePos_=a;b.preventDefault();return!0},onMouseDown_:function(b){if(this.target_)return this.forceMutationObserverFlush_(),this.lastMousePos_=