Lines Matching refs:instanceof
19 for(c.innerHTML=a.responseText;c.hasChildNodes();)document.head.appendChild(c.removeChild(c.firstChild))}}function g(a,c){var b=c||0,d=a;a instanceof Array||(d=[a]);e();f();d.forEach(function(a){if(window.FLATTENED){if(!window.FLATTENED[a])throw Error("Somehow, module "+a+" didn't get stored in the flattened js file! You may need to rerun build/generate_about_tracing_contents.py");}else if("APPENDED"!=v[a]&&"RESOLVING"!=v[a]){v[a]="RESOLVING";g(n[a]||[],b+1);for(var c=p[a]||[],e=0;e<c.length;e++)k(c[e]);
137 base.exportTo("base",function(){function d(b,a){if(b instanceof Object)if(b instanceof Array)for(var c=0;c<b.length;c++)a(b,c,b[c]),d(b[c],a);else for(c in b){var e=b[c];a(b,c,e);d(e,a)}}return{asArray:function(b){for(var a=[],c=0;c<b.length;c++)a.push(b[c]);return a},concatenateArrays:function(){for(var b=[],a=0;a<arguments.length;a++){if(!(arguments[a]instanceof Array))throw Error("Arguments "+a+"is not an array");b.push.apply(b,arguments[a])}return b},compareArrays:function(b,a,c){for(var e=Math.min(b.length,
201 this.updateCategories_();c&&this.shiftWorldToZero();for(k=0;k<d.length;k++)d[k].joinRefs();for(m in this.processes)this.processes[m].autoDeleteObjects(this.bounds.max);for(m in this.processes)this.processes[m].initializeObjects()}};b.canImport=function(a){return a instanceof Array&&0==a.length?!0:"string"===typeof a||a instanceof String?0==a.length:!1};b.prototype={__proto__:Object.prototype,extractSubtrace:function(){},importEvents:function(){},finalizeImport:function(){},joinRefs:function(){}};
207 l=function(a){return(a=k.exec(a))?{threadName:a[1],pid:a[2],cpuNumber:a[3],timestamp:a[4],eventName:a[5],details:a[6]}:a};c.lineParserWithLegacyFmt=l;c.traceEventClockSyncRE=/trace_event_clock_sync: parent_ts=(\d+\.?\d*)/;c.autoDetectLineParser=a;b.canImport=function(c){if(!("string"===typeof c||c instanceof String))return!1;if(b._extractEventsFromSystraceHTML(c,!1).ok||/^# tracer:/.test(c))return!0;var e=/^(.+)\n/.exec(c);e&&(c=e[1]);return a(c)?!0:!1};b._extractEventsFromSystraceHTML=function(a,
235 base.exportTo("tracing.importer",function(){function d(a){if(!(a instanceof Object)){if(void 0===a||null===a)return a;if("string"==typeof a)return a.substring();if("boolean"==typeof a||"number"==typeof a)return a;throw Error("Unrecognized: "+typeof a);}if(a instanceof Array){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=d(a[b]);return c}if(a.__proto__!=Object.prototype)throw Error("Can only clone simple types");c={};for(b in a)c[b]=d(a[b]);return c}function b(a,c){this.importPriority=1;this.model_=
236 a;this.systemTraceEvents_=this.events_=void 0;this.eventsWereFromString_=!1;this.allAsyncEvents_=[];this.allObjectEvents_=[];"string"===typeof c||c instanceof String?("["===c[0]&&(c=c.replace(/[\r|\n]*$/,"").replace(/\s*,\s*$/,""),"]"!==c[c.length-1]&&(c+="]")),this.events_=JSON.parse(c),this.eventsWereFromString_=!0):this.events_=c;if(this.events_.traceEvents){var b=this.events_;this.events_=this.events_.traceEvents;this.systemTraceEvents_=b.systemTraceEvents;for(var f in b)"traceEvents"!==f&&"systemTraceEvents"!==
237 f&&this.model_.metadata.push({name:f,value:b[f]})}}b.canImport=function(a){return"string"===typeof a||a instanceof String?"{"==a[0]||"["==a[0]:a instanceof Array&&a.length&&a[0].ph?!0:a.traceEvents?a.traceEvents instanceof Array&&a.traceEvents[0].ph:!1};b.prototype={__proto__:Object.prototype,extractSubtrace:function(){var a=this.systemTraceEvents_;this.systemTraceEvents_=void 0;return a},deepCopyIfNeeded_:function(a){return this.eventsWereFromString_?a:d(a)},processAsyncEvent:function(a){var c=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);
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!==
254 this);a.objects.iterObjectInstances(function(b){b.snapshots.forEach(function(b){this.searchItemForIDRefs_(c,a.objects,"ts",b)},this)},this);c.forEach(function(a){a.object[a.field]=a.value})},searchItemForIDRefs_:function(a,c,b,f){function d(g,h,m){void 0!==m&&(m.id_ref||m.idRef)&&(m=c.getSnapshotAt(m.id_ref||m.idRef,f[b]))&&a.push({object:g,field:h,value:m})}function h(a){if(a instanceof Object&&!(a instanceof tracing.trace_model.ObjectSnapshot||a instanceof Float32Array||a instanceof base.Quad))if(a instanceof
272 no_execution:!0},"V8.Parse":{pause:!0,no_execution:!0},"V8.PreParse":{pause:!0,no_execution:!0},"V8.ParseLazy":{pause:!0,no_execution:!0},"V8.GCScavenger":{pause:!0,no_execution:!0},"V8.GCCompactor":{pause:!0,no_execution:!0},"V8.GCContext":{pause:!0,no_execution:!0}};d.canImport=function(a){return"string"===typeof a||a instanceof String?"timer-event,"==a.substring(0,12)||"tick,"==a.substring(0,5)||"shared-library,"==a.substring(0,15)||"profiler,"==a.substring(0,9):!1};d.prototype={__proto__:Object.prototype,
286 this[c];f.forEach(function(c){b instanceof c.constructor&&a[c.pluralName].push_(b)})}return a},enumHitsOfType:function(a,c){for(var b=0;b<this.length_;b++)this[b]instanceof a&&c(this[b])},getNumSliceHits:function(){var a=0;this.enumHitsOfType(d,function(c){a++});return a},getNumCounterHits:function(){var a=0;this.enumHitsOfType(b,function(c){a++});return a},getNumObjectSnapshotHits:function(){var c=0;this.enumHitsOfType(a,function(a){c++});return c},getNumObjectInstanceHits:function(){var a=0;this.enumHitsOfType(c,
287 function(c){a++});return a},map:function(a){for(var c=0;c<this.length_;c++)a(this[c])},getShiftedSelection:function(a){for(var c=new e,b=0;b<this.length_;b++){var f=this[b];f.track.addItemNearToProvidedHitToSelection(f,a,c)}return 0==c.length?void 0:c}};return{SelectionSliceHit:d,SelectionCounterSampleHit:b,SelectionObjectSnapshotHit:a,SelectionObjectInstanceHit:c,Selection:e,createSelectionFromObjectAndView:function(a,c){var b=new e;if(a instanceof tracing.trace_model.Slice)b.addSlice(void 0,a);
288 else if(a instanceof tracing.trace_model.ObjectSnapshot)b.addObjectSnapshot(void 0,a);else if(a instanceof tracing.trace_model.ObjectInstance)b.addObjectInstance(void 0,a);else throw Error("Unrecognized selection type");return b}}});"use strict";
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"==
296 c,"undefined",d):null===a?this.appendSimpleText_(b,c,"null",d):a instanceof Object?a instanceof tracing.trace_model.ObjectSnapshot?(e=new tracing.analysis.ObjectSnapshotLink(a),e.objectSnapshot=a,this.appendElementWithLabel_(b,c,e,d)):a instanceof tracing.trace_model.ObjectInstance?(e=new tracing.analysis.ObjectInstanceLink(a),e.objectInstance=a,this.appendElementWithLabel_(b,c,e,d)):a instanceof Array?this.appendElementsForArray_(b,a,c,e,f,d):this.appendElementsForObject_(b,a,c,e,f,d):"string"==
305 tracing.analysis.tsRound(f.frequency_stddev)+")"));f=this.appendElement_(b,"tr");f.className="analysis-table-row";if(d){var k=this.appendTableCellWithTooltip_(b,f,0,a,h);k.textContent="";k.appendChild(this.createSelectionChangingLink(a,d,h))}else this.appendTableCellWithTooltip_(b,f,0,a,h);void 0!==c?c instanceof Array?this.appendTableCellWithTooltip_(b,f,1,"["+c.join(", ")+"]",h):this.appendTableCellWithTooltip_(b,f,1,tracing.analysis.tsRound(c)+" ms",h):this.appendTableCell_(b,f,1,"");void 0!==
316 var b=a.appendTable("analysis-object-sample-table",2);a.appendTableHeader(b,"Selected Objects:");c.forEach(function(c){var d=a.appendTableRow(b),h,k,l;if(c instanceof tracing.SelectionObjectSnapshotHit){var m=c.objectSnapshot;h=tracing.analysis.tsRound(m.ts);k=m.objectInstance.typeName+" "+m.objectInstance.id;l=function(){var a=new tracing.Selection;a.addObjectSnapshot(c.track,m);return a}}else{var n=c.objectInstance;h=n.deletionTs==Number.MAX_VALUE?"":tracing.analysis.tsRound(n.deletionTs);h=tracing.analysis.tsRound(n.creationTs)+
330 base.exportTo("tracing.analysis",function(){var d=ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="analysis-view";this.currentSelection_=this.currentView_=void 0;this.selections_=[];this.guid_=base.GUID.allocate();window.addEventListener("popstate",this.onPopState.bind(this))},changeViewType:function(b){if(!(this.currentView_ instanceof b)){this.textContent="";try{this.currentView_=new b,this.appendChild(this.currentView_)}catch(a){throw this.currentView_=
331 void 0,a;}this.currentView_ instanceof tracing.analysis.AnalysisResults?this.classList.remove("viewing-object"):this.classList.add("viewing-object")}},get currentView(){return this.currentView_},get selection(){return this.currentSelection_},set selection(b){this.selections_.push(b);window.history.pushState({view_guid:this.guid_,selection_guid:b.guid});this.processSelection(b)},clearSelectionHistory:function(){this.selections_=[]},onPopState:function(b){if(null!==b.state&&b.state.view_guid===this.guid_){var a;
333 tryToProcessSelectionUsingCustomViewer:function(b){var a,c,e;a=b.modelObject;if(b instanceof tracing.SelectionObjectSnapshotHit)c=a.objectInstance.typeName,e=tracing.analysis.ObjectSnapshotView,b=tracing.analysis.DefaultObjectSnapshotView;else if(b instanceof tracing.SelectionObjectInstanceHit)c=a.typeName,e=tracing.analysis.ObjectInstanceView,b=tracing.analysis.DefaultObjectInstanceView;else if(b instanceof tracing.SelectionSliceHit)c=a.title,e=tracing.analysis.SliceView,b=void 0;else return!1;b=
370 instanceof b&&(a.categoryFilter=this.categoryFilter)},undecorateChild_:function(a){a.detach&&a.detach()},updateContents_:function(){},drawTrack:function(a){var c=this.context();if(void 0!==c){c.save();var b=this.setupCanvasForDraw_();this.draw(a,b.left,b.right);c.restore()}},draw:function(a,
376 0;a<this.children.length;++a)this.children[a]instanceof tracing.tracks.Track&&this.children[a].drawTrack(d.INSTANT_EVENT);for(a=0;a<this.children.length;++a)this.children[a]instanceof tracing.tracks.Track&&this.children[a].drawTrack(d.SLICE);var c=window.devicePixelRatio||1,b=this.canvas_.getBoundingClientRect(),a=this.viewport.xViewToWorld(0),c=this.viewport.xViewToWorld(b.width*c);this.viewport.drawGridLines(this.ctx_,a,c);this.viewport.drawMarkerLines(this.ctx_,a,c)},this)},this))},updateCanvasSizeIfNeeded_:function(){var a=
378 "px")},visibleFilter_:function(a){return a instanceof tracing.tracks.Track?"none"!==window.getComputedStyle(a).display:!1}};return{DrawingContainer:b,DrawType:d}});"use strict";base.exportTo("tracing",function(){return{constants:{HEADING_WIDTH:250}}});"use strict";base.requireStylesheet("tracing.tracks.heading_track");base.require("tracing.constants");base.require("tracing.tracks.track");base.require("ui");
392 base.exportTo("tracing.tracks",function(){var d=ui.define("container-track",tracing.tracks.Track);d.prototype={__proto__:tracing.tracks.Track.prototype,decorate:function(b){tracing.tracks.Track.prototype.decorate.call(this,b)},detach:function(){this.textContent=""},get tracks_(){for(var b=[],a=0;a<this.children.length;a++)this.children[a].classList.contains("track")&&b.push(this.children[a]);return b},drawTrack:function(b){for(var a=0;a<this.children.length;++a)this.children[a]instanceof tracing.tracks.Track&&
414 a.creationTs},a,b,h)},addItemNearToProvidedHitToSelection:function(a,b,d){if(a instanceof tracing.SelectionObjectSnapshotHit){if(a=this.objectSnapshots_.indexOf(a.objectSnapshot),b=a+b,0<=b&&b<this.objectSnapshots_.length)return d.addObjectSnapshot(this,this.objectSnapshots_[b]),!0}else if(a instanceof tracing.SelectionObjectInstanceHit){if(a=this.objectInstances_.indexOf(a.objectInstance),b=a+b,0<=b&&b<this.objectInstances_.length)return d.addObjectInstance(this,this.objectInstances_[b]),!0}else throw Error("Unrecognized hit");
421 a,b,function(a){g.addObjectSnapshot(h,a)})},addItemNearToProvidedHitToSelection:function(a,b,d){if(a instanceof tracing.SelectionObjectSnapshotHit){var g=this.objectInstance_.snapshots;a=g.indexOf(a.objectSnapshot)+b;if(0<=a&&a<g.length)return d.addObjectSnapshot(this,g[a]),!0}else throw Error("Unrecognized hit");return!1},addAllObjectsMatchingFilterToSelection:function(a,b){}};tracing.tracks.ObjectInstanceTrack.register("memory::Heap",a);return{HeapInstanceTrack:a}});"use strict";base.requireStylesheet("tracing.tracks.counter_track");
485 this.activeElement instanceof tracing.FindControl?!1:this.focusElement_?0<=this.focusElement.tabIndex?document.activeElement==this.focusElement?!0:ui.elementIsChildOf(document.activeElement,this.focusElement):!0:!0},onMouseMove_:function(a){this.isZooming_||this.storeLastMousePos_(a)},onKeypress_:function(a){var b=this.viewport_;if(this.listenToKeys_&&"INPUT"!=document.activeElement.nodeName){var d=this.modelTrackContainer_.canvas.clientWidth;switch(a.keyCode){case 119:case 44:this.zoomBy_(1.5);break;
492 get selection(){return this.selection_},set selection(a){if(!(a instanceof d))throw Error("Expected Selection");var b;for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!1;this.selection_.clear();this.selection_.addSelection(a);base.dispatchSimpleEvent(this,"selectionChange");for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!0;this.selection_.length&&this.selection_[0].track&&this.selection_[0].track.scrollIntoViewIfNeeded();this.viewport_.dispatchChangeEvent()},hideDragBox_:function(){this.dragBox_.style.left=