| Index: chrome_linux/resources/inspector/HeapSnapshotWorker.js
|
| ===================================================================
|
| --- chrome_linux/resources/inspector/HeapSnapshotWorker.js (revision 230844)
|
| +++ chrome_linux/resources/inspector/HeapSnapshotWorker.js (working copy)
|
| @@ -1,4 +1,39 @@
|
| -WebInspector={};WebInspector.UIString=function(s){return s;};WebInspector.HeapSnapshotArraySlice=function(array,start,end)
|
| +WebInspector={};WebInspector.UIString=function(s){return s;};WebInspector.AllocationProfile=function(profile)
|
| +{this._strings=profile.strings;this._nextNodeId=1;this._idToFunctionInfo={};this._idToNode={};this._collapsedTopNodeIdToFunctionInfo={};this._traceTops=null;this._buildAllocationFunctionInfos(profile.trace_function_infos);this._traceTree=this._buildInvertedAllocationTree(profile.trace_tree);}
|
| +WebInspector.AllocationProfile.prototype={_buildAllocationFunctionInfos:function(rawInfos)
|
| +{var strings=this._strings;var functionIdOffset=0;var functionNameOffset=1;var scriptNameOffset=2;var functionInfoFieldCount=3;var map=this._idToFunctionInfo;map[0]=new WebInspector.FunctionAllocationInfo("(root)","<unknown>");var infoLength=rawInfos.length;for(var i=0;i<infoLength;i+=functionInfoFieldCount){map[rawInfos[i+functionIdOffset]]=new WebInspector.FunctionAllocationInfo(strings[rawInfos[i+functionNameOffset]],strings[rawInfos[i+scriptNameOffset]]);}},_buildInvertedAllocationTree:function(traceTreeRaw)
|
| +{var idToFunctionInfo=this._idToFunctionInfo;var nodeIdOffset=0;var functionIdOffset=1;var allocationCountOffset=2;var allocationSizeOffset=3;var childrenOffset=4;var nodeFieldCount=5;function traverseNode(rawNodeArray,nodeOffset,parent)
|
| +{var functionInfo=idToFunctionInfo[rawNodeArray[nodeOffset+functionIdOffset]];var result=new WebInspector.AllocationTraceNode(rawNodeArray[nodeOffset+nodeIdOffset],functionInfo,rawNodeArray[nodeOffset+allocationCountOffset],rawNodeArray[nodeOffset+allocationSizeOffset],parent);functionInfo.addTraceTopNode(result);var rawChildren=rawNodeArray[nodeOffset+childrenOffset];for(var i=0;i<rawChildren.length;i+=nodeFieldCount){result.children.push(traverseNode(rawChildren,i,result));}
|
| +return result;}
|
| +return traverseNode(traceTreeRaw,0,null);},serializeTraceTops:function()
|
| +{if(this._traceTops)
|
| +return this._traceTops;var result=this._traceTops=[];var idToFunctionInfo=this._idToFunctionInfo;for(var id in idToFunctionInfo){var info=idToFunctionInfo[id];if(info.totalCount===0)
|
| +continue;var nodeId=this._nextNodeId++;result.push(this._serializeNode(nodeId,info.functionName,info.totalCount,info.totalSize,true));this._collapsedTopNodeIdToFunctionInfo[nodeId]=info;}
|
| +return result;},serializeCallers:function(nodeId)
|
| +{var node=this._idToNode[nodeId];if(!node){var functionInfo=this._collapsedTopNodeIdToFunctionInfo[nodeId];node=functionInfo.tracesWithThisTop();delete this._collapsedTopNodeIdToFunctionInfo[nodeId];this._idToNode[nodeId]=node;}
|
| +var result=[];var callers=node.callers();for(var i=0;i<callers.length;i++){var callerNode=callers[i];var callerId=this._nextNodeId++;this._idToNode[callerId]=callerNode;result.push(this._serializeNode(callerId,callerNode.functionInfo.functionName,callerNode.allocationCount,callerNode.allocationSize,callerNode.hasCallers()));}
|
| +return result;},_serializeNode:function(nodeId,functionName,count,size,hasChildren)
|
| +{return{id:nodeId,name:functionName,count:count,size:size,hasChildren:hasChildren};}}
|
| +WebInspector.AllocationTraceNode=function(id,functionInfo,count,size,parent)
|
| +{this.id=id;this.functionInfo=functionInfo;this.allocationCount=count;this.allocationSize=size;this.parent=parent;this.children=[];}
|
| +WebInspector.AllocationBackTraceNode=function(functionInfo)
|
| +{this.functionInfo=functionInfo;this.allocationCount=0;this.allocationSize=0;this._callers=[];}
|
| +WebInspector.AllocationBackTraceNode.prototype={addCaller:function(traceNode)
|
| +{var functionInfo=traceNode.functionInfo;var result;for(var i=0;i<this._callers.length;i++){var caller=this._callers[i];if(caller.functionInfo===functionInfo){result=caller;break;}}
|
| +if(!result){result=new WebInspector.AllocationBackTraceNode(functionInfo);this._callers.push(result);}
|
| +return result;},callers:function()
|
| +{return this._callers;},hasCallers:function()
|
| +{return this._callers.length>0;}}
|
| +WebInspector.FunctionAllocationInfo=function(functionName,scriptName)
|
| +{this.functionName=functionName;this.scriptName=scriptName;this.totalCount=0;this.totalSize=0;this._traceTops=[];}
|
| +WebInspector.FunctionAllocationInfo.prototype={addTraceTopNode:function(node)
|
| +{if(node.allocationCount===0)
|
| +return;this._traceTops.push(node);this.totalCount+=node.allocationCount;this.totalSize+=node.allocationSize;},tracesWithThisTop:function()
|
| +{if(!this._traceTops.length)
|
| +return null;if(!this._backTraceTree)
|
| +this._buildAllocationTraceTree();return this._backTraceTree;},_buildAllocationTraceTree:function()
|
| +{this._backTraceTree=new WebInspector.AllocationBackTraceNode(this._traceTops[0].functionInfo);for(var i=0;i<this._traceTops.length;i++){var node=this._traceTops[i];var backTraceNode=this._backTraceTree;var count=node.allocationCount;var size=node.allocationSize;while(true){backTraceNode.allocationCount+=count;backTraceNode.allocationSize+=size;node=node.parent;if(node===null){break;}
|
| +backTraceNode=backTraceNode.addCaller(node);}}}};WebInspector.HeapSnapshotArraySlice=function(array,start,end)
|
| {this._array=array;this._start=start;this.length=end-start;}
|
| WebInspector.HeapSnapshotArraySlice.prototype={item:function(index)
|
| {return this._array[this._start+index];},slice:function(start,end)
|
| @@ -82,15 +117,22 @@
|
| {this.node.nodeIndex=newIndex;},item:function()
|
| {return this.node;},next:function()
|
| {this.node.nodeIndex=this.node._nextNodeIndex();}}
|
| -WebInspector.HeapSnapshot=function(profile)
|
| -{this.uid=profile.snapshot.uid;this._nodes=profile.nodes;this._containmentEdges=profile.edges;this._metaNode=profile.snapshot.meta;this._strings=profile.strings;this._noDistance=-5;this._rootNodeIndex=0;if(profile.snapshot.root_index)
|
| -this._rootNodeIndex=profile.snapshot.root_index;this._snapshotDiffs={};this._aggregatesForDiff=null;this._init();}
|
| -function HeapSnapshotMetainfo()
|
| +WebInspector.HeapSnapshotProgress=function(dispatcher)
|
| +{this._dispatcher=dispatcher;}
|
| +WebInspector.HeapSnapshotProgress.Event={Update:"ProgressUpdate"};WebInspector.HeapSnapshotProgress.prototype={updateStatus:function(status)
|
| +{this._sendUpdateEvent(WebInspector.UIString(status));},updateProgress:function(title,value,total)
|
| +{var percentValue=((total?(value/total):0)*100).toFixed(0);this._sendUpdateEvent(WebInspector.UIString(title,percentValue));},_sendUpdateEvent:function(text)
|
| +{if(this._dispatcher)
|
| +this._dispatcher.sendEvent(WebInspector.HeapSnapshotProgress.Event.Update,text);}}
|
| +WebInspector.HeapSnapshot=function(profile,progress)
|
| +{this.uid=profile.snapshot.uid;this._nodes=profile.nodes;this._containmentEdges=profile.edges;this._metaNode=profile.snapshot.meta;this._strings=profile.strings;this._progress=progress;this._noDistance=-5;this._rootNodeIndex=0;if(profile.snapshot.root_index)
|
| +this._rootNodeIndex=profile.snapshot.root_index;this._snapshotDiffs={};this._aggregatesForDiff=null;this._init();if(WebInspector.HeapSnapshot.enableAllocationProfiler){this._progress.updateStatus("Buiding allocation statistics\u2026");this._allocationProfile=new WebInspector.AllocationProfile(profile);this._progress.updateStatus("Done");}}
|
| +WebInspector.HeapSnapshot.enableAllocationProfiler=false;function HeapSnapshotMetainfo()
|
| {this.node_fields=[];this.node_types=[];this.edge_fields=[];this.edge_types=[];this.type_strings={};this.fields=[];this.types=[];}
|
| function HeapSnapshotHeader()
|
| {this.title="";this.uid=0;this.meta=new HeapSnapshotMetainfo();this.node_count=0;this.edge_count=0;}
|
| WebInspector.HeapSnapshot.prototype={_init:function()
|
| -{var meta=this._metaNode;this._nodeTypeOffset=meta.node_fields.indexOf("type");this._nodeNameOffset=meta.node_fields.indexOf("name");this._nodeIdOffset=meta.node_fields.indexOf("id");this._nodeSelfSizeOffset=meta.node_fields.indexOf("self_size");this._nodeEdgeCountOffset=meta.node_fields.indexOf("edge_count");this._nodeFieldCount=meta.node_fields.length;this._nodeTypes=meta.node_types[this._nodeTypeOffset];this._nodeHiddenType=this._nodeTypes.indexOf("hidden");this._nodeObjectType=this._nodeTypes.indexOf("object");this._nodeNativeType=this._nodeTypes.indexOf("native");this._nodeCodeType=this._nodeTypes.indexOf("code");this._nodeSyntheticType=this._nodeTypes.indexOf("synthetic");this._edgeFieldsCount=meta.edge_fields.length;this._edgeTypeOffset=meta.edge_fields.indexOf("type");this._edgeNameOffset=meta.edge_fields.indexOf("name_or_index");this._edgeToNodeOffset=meta.edge_fields.indexOf("to_node");this._edgeTypes=meta.edge_types[this._edgeTypeOffset];this._edgeTypes.push("invisible");this._edgeElementType=this._edgeTypes.indexOf("element");this._edgeHiddenType=this._edgeTypes.indexOf("hidden");this._edgeInternalType=this._edgeTypes.indexOf("internal");this._edgeShortcutType=this._edgeTypes.indexOf("shortcut");this._edgeWeakType=this._edgeTypes.indexOf("weak");this._edgeInvisibleType=this._edgeTypes.indexOf("invisible");this.nodeCount=this._nodes.length/this._nodeFieldCount;this._edgeCount=this._containmentEdges.length/this._edgeFieldsCount;this._buildEdgeIndexes();this._markInvisibleEdges();this._buildRetainers();this._calculateFlags();this._calculateDistances();var result=this._buildPostOrderIndex();this._dominatorsTree=this._buildDominatorTree(result.postOrderIndex2NodeOrdinal,result.nodeOrdinal2PostOrderIndex);this._calculateRetainedSizes(result.postOrderIndex2NodeOrdinal);this._buildDominatedNodes();},_buildEdgeIndexes:function()
|
| +{var meta=this._metaNode;this._nodeTypeOffset=meta.node_fields.indexOf("type");this._nodeNameOffset=meta.node_fields.indexOf("name");this._nodeIdOffset=meta.node_fields.indexOf("id");this._nodeSelfSizeOffset=meta.node_fields.indexOf("self_size");this._nodeEdgeCountOffset=meta.node_fields.indexOf("edge_count");this._nodeFieldCount=meta.node_fields.length;this._nodeTypes=meta.node_types[this._nodeTypeOffset];this._nodeHiddenType=this._nodeTypes.indexOf("hidden");this._nodeObjectType=this._nodeTypes.indexOf("object");this._nodeNativeType=this._nodeTypes.indexOf("native");this._nodeConsStringType=this._nodeTypes.indexOf("concatenated string");this._nodeSlicedStringType=this._nodeTypes.indexOf("sliced string");this._nodeCodeType=this._nodeTypes.indexOf("code");this._nodeSyntheticType=this._nodeTypes.indexOf("synthetic");this._edgeFieldsCount=meta.edge_fields.length;this._edgeTypeOffset=meta.edge_fields.indexOf("type");this._edgeNameOffset=meta.edge_fields.indexOf("name_or_index");this._edgeToNodeOffset=meta.edge_fields.indexOf("to_node");this._edgeTypes=meta.edge_types[this._edgeTypeOffset];this._edgeTypes.push("invisible");this._edgeElementType=this._edgeTypes.indexOf("element");this._edgeHiddenType=this._edgeTypes.indexOf("hidden");this._edgeInternalType=this._edgeTypes.indexOf("internal");this._edgeShortcutType=this._edgeTypes.indexOf("shortcut");this._edgeWeakType=this._edgeTypes.indexOf("weak");this._edgeInvisibleType=this._edgeTypes.indexOf("invisible");this.nodeCount=this._nodes.length/this._nodeFieldCount;this._edgeCount=this._containmentEdges.length/this._edgeFieldsCount;this._progress.updateStatus("Building edge indexes\u2026");this._buildEdgeIndexes();this._progress.updateStatus("Marking invisible edges\u2026");this._markInvisibleEdges();this._progress.updateStatus("Building retainers\u2026");this._buildRetainers();this._progress.updateStatus("Calculating node flags\u2026");this._calculateFlags();this._progress.updateStatus("Calculating distances\u2026");this._calculateDistances();this._progress.updateStatus("Building postorder index\u2026");var result=this._buildPostOrderIndex();this._progress.updateStatus("Building dominator tree\u2026");this._dominatorsTree=this._buildDominatorTree(result.postOrderIndex2NodeOrdinal,result.nodeOrdinal2PostOrderIndex);this._progress.updateStatus("Calculating retained sizes\u2026");this._calculateRetainedSizes(result.postOrderIndex2NodeOrdinal);this._progress.updateStatus("Buiding dominated nodes\u2026");this._buildDominatedNodes();this._progress.updateStatus("Finished processing.");},_buildEdgeIndexes:function()
|
| {var nodes=this._nodes;var nodeCount=this.nodeCount;var firstEdgeIndexes=this._firstEdgeIndexes=new Uint32Array(nodeCount+1);var nodeFieldCount=this._nodeFieldCount;var edgeFieldsCount=this._edgeFieldsCount;var nodeEdgeCountOffset=this._nodeEdgeCountOffset;firstEdgeIndexes[nodeCount]=this._containmentEdges.length;for(var nodeOrdinal=0,edgeIndex=0;nodeOrdinal<nodeCount;++nodeOrdinal){firstEdgeIndexes[nodeOrdinal]=edgeIndex;edgeIndex+=nodes[nodeOrdinal*nodeFieldCount+nodeEdgeCountOffset]*edgeFieldsCount;}},_buildRetainers:function()
|
| {var retainingNodes=this._retainingNodes=new Uint32Array(this._edgeCount);var retainingEdges=this._retainingEdges=new Uint32Array(this._edgeCount);var firstRetainerIndex=this._firstRetainerIndex=new Uint32Array(this.nodeCount+1);var containmentEdges=this._containmentEdges;var edgeFieldsCount=this._edgeFieldsCount;var nodeFieldCount=this._nodeFieldCount;var edgeToNodeOffset=this._edgeToNodeOffset;var nodes=this._nodes;var firstEdgeIndexes=this._firstEdgeIndexes;var nodeCount=this.nodeCount;for(var toNodeFieldIndex=edgeToNodeOffset,l=containmentEdges.length;toNodeFieldIndex<l;toNodeFieldIndex+=edgeFieldsCount){var toNodeIndex=containmentEdges[toNodeFieldIndex];if(toNodeIndex%nodeFieldCount)
|
| throw new Error("Invalid toNodeIndex "+toNodeIndex);++firstRetainerIndex[toNodeIndex/nodeFieldCount];}
|
| @@ -114,7 +156,9 @@
|
| return aggregatesByClassName;}
|
| var filter;if(filterString)
|
| filter=this._parseFilter(filterString);var aggregates=this._buildAggregates(filter);this._calculateClassesRetainedSize(aggregates.aggregatesByClassIndex,filter);aggregatesByClassName=aggregates.aggregatesByClassName;if(sortedIndexes)
|
| -this._sortAggregateIndexes(aggregatesByClassName);this._aggregatesSortedFlags[key]=sortedIndexes;this._aggregates[key]=aggregatesByClassName;return aggregatesByClassName;},aggregatesForDiff:function()
|
| +this._sortAggregateIndexes(aggregatesByClassName);this._aggregatesSortedFlags[key]=sortedIndexes;this._aggregates[key]=aggregatesByClassName;return aggregatesByClassName;},allocationTracesTops:function()
|
| +{return this._allocationProfile.serializeTraceTops();},allocationNodeCallers:function(nodeId)
|
| +{return this._allocationProfile.serializeCallers(nodeId);},aggregatesForDiff:function()
|
| {if(this._aggregatesForDiff)
|
| return this._aggregatesForDiff;var aggregatesByClassName=this.aggregates(true,"allObjects");this._aggregatesForDiff={};var node=this.createNode();for(var className in aggregatesByClassName){var aggregate=aggregatesByClassName[className];var indexes=aggregate.idxs;var ids=new Array(indexes.length);var selfSizes=new Array(indexes.length);for(var i=0;i<indexes.length;i++){node.nodeIndex=indexes[i];ids[i]=node.id();selfSizes[i]=node.selfSize();}
|
| this._aggregatesForDiff[className]={indexes:indexes,ids:ids,selfSizes:selfSizes};}
|
| @@ -207,7 +251,7 @@
|
| {return new WebInspector.HeapSnapshotNodesProvider(this,this.classNodesFilter(),this.aggregates(false,aggregatesKey)[className].idxs);},createNodesProviderForDominator:function(nodeIndex)
|
| {var node=this.createNode(nodeIndex);return new WebInspector.HeapSnapshotNodesProvider(this,null,this._dominatedNodesOfNode(node));},updateStaticData:function()
|
| {return{nodeCount:this.nodeCount,rootNodeIndex:this._rootNodeIndex,totalSize:this.totalSize,uid:this.uid};}};WebInspector.HeapSnapshotFilteredOrderedIterator=function(iterator,filter,unfilteredIterationOrder)
|
| -{this._filter=filter;this._iterator=iterator;this._unfilteredIterationOrder=unfilteredIterationOrder;this._iterationOrder=null;this._position=0;this._currentComparator=null;this._sortedPrefixLength=0;}
|
| +{this._filter=filter;this._iterator=iterator;this._unfilteredIterationOrder=unfilteredIterationOrder;this._iterationOrder=null;this._position=0;this._currentComparator=null;this._sortedPrefixLength=0;this._sortedSuffixLength=0;}
|
| WebInspector.HeapSnapshotFilteredOrderedIterator.prototype={_createIterationOrder:function()
|
| {if(this._iterationOrder)
|
| return;if(this._unfilteredIterationOrder&&!this._filter){this._iterationOrder=this._unfilteredIterationOrder.slice(0);this._unfilteredIterationOrder=null;return;}
|
| @@ -229,51 +273,57 @@
|
| {this._createIterationOrder();return this._iterationOrder.length;},next:function()
|
| {++this._position;},serializeItemsRange:function(begin,end)
|
| {this._createIterationOrder();if(begin>end)
|
| -throw new Error("Start position > end position: "+begin+" > "+end);if(end>=this._iterationOrder.length)
|
| -end=this._iterationOrder.length;if(this._sortedPrefixLength<end){this.sort(this._currentComparator,this._sortedPrefixLength,this._iterationOrder.length-1,end-this._sortedPrefixLength);this._sortedPrefixLength=end;}
|
| +throw new Error("Start position > end position: "+begin+" > "+end);if(end>this._iterationOrder.length)
|
| +end=this._iterationOrder.length;if(this._sortedPrefixLength<end&&begin<this._iterationOrder.length-this._sortedSuffixLength){this.sort(this._currentComparator,this._sortedPrefixLength,this._iterationOrder.length-1-this._sortedSuffixLength,begin,end-1);if(begin<=this._sortedPrefixLength)
|
| +this._sortedPrefixLength=end;if(end>=this._iterationOrder.length-this._sortedSuffixLength)
|
| +this._sortedSuffixLength=this._iterationOrder.length-begin;}
|
| this._position=begin;var startPosition=this._position;var count=end-begin;var result=new Array(count);for(var i=0;i<count&&this.hasNext();++i,this.next())
|
| result[i]=this.item().serialize();result.length=i;result.totalLength=this._iterationOrder.length;result.startPosition=startPosition;result.endPosition=this._position;return result;},sortAll:function()
|
| -{this._createIterationOrder();if(this._sortedPrefixLength===this._iterationOrder.length)
|
| -return;this.sort(this._currentComparator,this._sortedPrefixLength,this._iterationOrder.length-1,this._iterationOrder.length);this._sortedPrefixLength=this._iterationOrder.length;},sortAndRewind:function(comparator)
|
| -{this._currentComparator=comparator;this._sortedPrefixLength=0;this.rewind();}}
|
| +{this._createIterationOrder();if(this._sortedPrefixLength+this._sortedSuffixLength>=this._iterationOrder.length)
|
| +return;this.sort(this._currentComparator,this._sortedPrefixLength,this._iterationOrder.length-1-this._sortedSuffixLength,this._sortedPrefixLength,this._iterationOrder.length-1-this._sortedSuffixLength);this._sortedPrefixLength=this._iterationOrder.length;this._sortedSuffixLength=0;},sortAndRewind:function(comparator)
|
| +{this._currentComparator=comparator;this._sortedPrefixLength=0;this._sortedSuffixLength=0;this.rewind();}}
|
| WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator=function(fieldNames)
|
| {return{fieldName1:fieldNames[0],ascending1:fieldNames[1],fieldName2:fieldNames[2],ascending2:fieldNames[3]};}
|
| WebInspector.HeapSnapshotEdgesProvider=function(snapshot,filter,edgesIter)
|
| {this.snapshot=snapshot;WebInspector.HeapSnapshotFilteredOrderedIterator.call(this,edgesIter,filter);}
|
| -WebInspector.HeapSnapshotEdgesProvider.prototype={sort:function(comparator,leftBound,rightBound,count)
|
| +WebInspector.HeapSnapshotEdgesProvider.prototype={sort:function(comparator,leftBound,rightBound,windowLeft,windowRight)
|
| {var fieldName1=comparator.fieldName1;var fieldName2=comparator.fieldName2;var ascending1=comparator.ascending1;var ascending2=comparator.ascending2;var edgeA=this._iterator.item().clone();var edgeB=edgeA.clone();var nodeA=this.snapshot.createNode();var nodeB=this.snapshot.createNode();function compareEdgeFieldName(ascending,indexA,indexB)
|
| {edgeA.edgeIndex=indexA;edgeB.edgeIndex=indexB;if(edgeB.name()==="__proto__")return-1;if(edgeA.name()==="__proto__")return 1;var result=edgeA.hasStringName()===edgeB.hasStringName()?(edgeA.name()<edgeB.name()?-1:(edgeA.name()>edgeB.name()?1:0)):(edgeA.hasStringName()?-1:1);return ascending?result:-result;}
|
| function compareNodeField(fieldName,ascending,indexA,indexB)
|
| {edgeA.edgeIndex=indexA;nodeA.nodeIndex=edgeA.nodeIndex();var valueA=nodeA[fieldName]();edgeB.edgeIndex=indexB;nodeB.nodeIndex=edgeB.nodeIndex();var valueB=nodeB[fieldName]();var result=valueA<valueB?-1:(valueA>valueB?1:0);return ascending?result:-result;}
|
| function compareEdgeAndNode(indexA,indexB){var result=compareEdgeFieldName(ascending1,indexA,indexB);if(result===0)
|
| -result=compareNodeField(fieldName2,ascending2,indexA,indexB);return result;}
|
| +result=compareNodeField(fieldName2,ascending2,indexA,indexB);if(result===0)
|
| +return indexA-indexB;return result;}
|
| function compareNodeAndEdge(indexA,indexB){var result=compareNodeField(fieldName1,ascending1,indexA,indexB);if(result===0)
|
| -result=compareEdgeFieldName(ascending2,indexA,indexB);return result;}
|
| +result=compareEdgeFieldName(ascending2,indexA,indexB);if(result===0)
|
| +return indexA-indexB;return result;}
|
| function compareNodeAndNode(indexA,indexB){var result=compareNodeField(fieldName1,ascending1,indexA,indexB);if(result===0)
|
| -result=compareNodeField(fieldName2,ascending2,indexA,indexB);return result;}
|
| +result=compareNodeField(fieldName2,ascending2,indexA,indexB);if(result===0)
|
| +return indexA-indexB;return result;}
|
| if(fieldName1==="!edgeName")
|
| -this._iterationOrder.sortRange(compareEdgeAndNode,leftBound,rightBound,count);else if(fieldName2==="!edgeName")
|
| -this._iterationOrder.sortRange(compareNodeAndEdge,leftBound,rightBound,count);else
|
| -this._iterationOrder.sortRange(compareNodeAndNode,leftBound,rightBound,count);},__proto__:WebInspector.HeapSnapshotFilteredOrderedIterator.prototype}
|
| +this._iterationOrder.sortRange(compareEdgeAndNode,leftBound,rightBound,windowLeft,windowRight);else if(fieldName2==="!edgeName")
|
| +this._iterationOrder.sortRange(compareNodeAndEdge,leftBound,rightBound,windowLeft,windowRight);else
|
| +this._iterationOrder.sortRange(compareNodeAndNode,leftBound,rightBound,windowLeft,windowRight);},__proto__:WebInspector.HeapSnapshotFilteredOrderedIterator.prototype}
|
| WebInspector.HeapSnapshotNodesProvider=function(snapshot,filter,nodeIndexes)
|
| {this.snapshot=snapshot;WebInspector.HeapSnapshotFilteredOrderedIterator.call(this,snapshot._allNodes(),filter,nodeIndexes);}
|
| WebInspector.HeapSnapshotNodesProvider.prototype={nodePosition:function(snapshotObjectId)
|
| {this._createIterationOrder();if(this.isEmpty())
|
| return-1;this.sortAll();var node=this.snapshot.createNode();for(var i=0;i<this._iterationOrder.length;i++){node.nodeIndex=this._iterationOrder[i];if(node.id()===snapshotObjectId)
|
| return i;}
|
| -return-1;},sort:function(comparator,leftBound,rightBound,count)
|
| +return-1;},sort:function(comparator,leftBound,rightBound,windowLeft,windowRight)
|
| {var fieldName1=comparator.fieldName1;var fieldName2=comparator.fieldName2;var ascending1=comparator.ascending1;var ascending2=comparator.ascending2;var nodeA=this.snapshot.createNode();var nodeB=this.snapshot.createNode();function sortByNodeField(fieldName,ascending)
|
| {var valueOrFunctionA=nodeA[fieldName];var valueA=typeof valueOrFunctionA!=="function"?valueOrFunctionA:valueOrFunctionA.call(nodeA);var valueOrFunctionB=nodeB[fieldName];var valueB=typeof valueOrFunctionB!=="function"?valueOrFunctionB:valueOrFunctionB.call(nodeB);var result=valueA<valueB?-1:(valueA>valueB?1:0);return ascending?result:-result;}
|
| function sortByComparator(indexA,indexB){nodeA.nodeIndex=indexA;nodeB.nodeIndex=indexB;var result=sortByNodeField(fieldName1,ascending1);if(result===0)
|
| -result=sortByNodeField(fieldName2,ascending2);return result;}
|
| -this._iterationOrder.sortRange(sortByComparator,leftBound,rightBound,count);},__proto__:WebInspector.HeapSnapshotFilteredOrderedIterator.prototype};WebInspector.HeapSnapshotLoader=function()
|
| -{this._reset();}
|
| +result=sortByNodeField(fieldName2,ascending2);if(result===0)
|
| +return indexA-indexB;return result;}
|
| +this._iterationOrder.sortRange(sortByComparator,leftBound,rightBound,windowLeft,windowRight);},__proto__:WebInspector.HeapSnapshotFilteredOrderedIterator.prototype};WebInspector.HeapSnapshotLoader=function(dispatcher)
|
| +{this._reset();this._progress=new WebInspector.HeapSnapshotProgress(dispatcher);}
|
| WebInspector.HeapSnapshotLoader.prototype={dispose:function()
|
| {this._reset();},_reset:function()
|
| {this._json="";this._state="find-snapshot-info";this._snapshot={};},close:function()
|
| {if(this._json)
|
| this._parseStringsArray();},buildSnapshot:function(constructorName)
|
| -{var constructor=WebInspector[constructorName];var result=new constructor(this._snapshot);this._reset();return result;},_parseUintArray:function()
|
| +{this._progress.updateStatus("Processing snapshot\u2026");var constructor=WebInspector[constructorName];var result=new constructor(this._snapshot,this._progress);this._reset();return result;},_parseUintArray:function()
|
| {var index=0;var char0="0".charCodeAt(0),char9="9".charCodeAt(0),closingBracket="]".charCodeAt(0);var length=this._json.length;while(true){while(index<length){var code=this._json.charCodeAt(index);if(char0<=code&&code<=char9)
|
| break;else if(code===closingBracket){this._json=this._json.slice(index+1);return false;}
|
| ++index;}
|
| @@ -282,39 +332,52 @@
|
| break;nextNumber*=10;nextNumber+=(code-char0);++index;}
|
| if(index===length){this._json=this._json.slice(startIndex);return true;}
|
| this._array[this._arrayIndex++]=nextNumber;}},_parseStringsArray:function()
|
| -{var closingBracketIndex=this._json.lastIndexOf("]");if(closingBracketIndex===-1)
|
| +{this._progress.updateStatus("Parsing strings\u2026");var closingBracketIndex=this._json.lastIndexOf("]");if(closingBracketIndex===-1)
|
| throw new Error("Incomplete JSON");this._json=this._json.slice(0,closingBracketIndex+1);this._snapshot.strings=JSON.parse(this._json);},write:function(chunk)
|
| -{this._json+=chunk;switch(this._state){case"find-snapshot-info":{var snapshotToken="\"snapshot\"";var snapshotTokenIndex=this._json.indexOf(snapshotToken);if(snapshotTokenIndex===-1)
|
| -throw new Error("Snapshot token not found");this._json=this._json.slice(snapshotTokenIndex+snapshotToken.length+1);this._state="parse-snapshot-info";}
|
| +{this._json+=chunk;while(true){switch(this._state){case"find-snapshot-info":{var snapshotToken="\"snapshot\"";var snapshotTokenIndex=this._json.indexOf(snapshotToken);if(snapshotTokenIndex===-1)
|
| +throw new Error("Snapshot token not found");this._json=this._json.slice(snapshotTokenIndex+snapshotToken.length+1);this._state="parse-snapshot-info";this._progress.updateStatus("Loading snapshot info\u2026");break;}
|
| case"parse-snapshot-info":{var closingBracketIndex=WebInspector.findBalancedCurlyBrackets(this._json);if(closingBracketIndex===-1)
|
| -return;this._snapshot.snapshot=(JSON.parse(this._json.slice(0,closingBracketIndex)));this._json=this._json.slice(closingBracketIndex);this._state="find-nodes";}
|
| +return;this._snapshot.snapshot=(JSON.parse(this._json.slice(0,closingBracketIndex)));this._json=this._json.slice(closingBracketIndex);this._state="find-nodes";break;}
|
| case"find-nodes":{var nodesToken="\"nodes\"";var nodesTokenIndex=this._json.indexOf(nodesToken);if(nodesTokenIndex===-1)
|
| return;var bracketIndex=this._json.indexOf("[",nodesTokenIndex);if(bracketIndex===-1)
|
| -return;this._json=this._json.slice(bracketIndex+1);var node_fields_count=this._snapshot.snapshot.meta.node_fields.length;var nodes_length=this._snapshot.snapshot.node_count*node_fields_count;this._array=new Uint32Array(nodes_length);this._arrayIndex=0;this._state="parse-nodes";}
|
| -case"parse-nodes":{if(this._parseUintArray())
|
| -return;this._snapshot.nodes=this._array;this._state="find-edges";this._array=null;}
|
| +return;this._json=this._json.slice(bracketIndex+1);var node_fields_count=this._snapshot.snapshot.meta.node_fields.length;var nodes_length=this._snapshot.snapshot.node_count*node_fields_count;this._array=new Uint32Array(nodes_length);this._arrayIndex=0;this._state="parse-nodes";break;}
|
| +case"parse-nodes":{var hasMoreData=this._parseUintArray();this._progress.updateProgress("Loading nodes\u2026 %d\%",this._arrayIndex,this._array.length);if(hasMoreData)
|
| +return;this._snapshot.nodes=this._array;this._state="find-edges";this._array=null;break;}
|
| case"find-edges":{var edgesToken="\"edges\"";var edgesTokenIndex=this._json.indexOf(edgesToken);if(edgesTokenIndex===-1)
|
| return;var bracketIndex=this._json.indexOf("[",edgesTokenIndex);if(bracketIndex===-1)
|
| -return;this._json=this._json.slice(bracketIndex+1);var edge_fields_count=this._snapshot.snapshot.meta.edge_fields.length;var edges_length=this._snapshot.snapshot.edge_count*edge_fields_count;this._array=new Uint32Array(edges_length);this._arrayIndex=0;this._state="parse-edges";}
|
| -case"parse-edges":{if(this._parseUintArray())
|
| -return;this._snapshot.edges=this._array;this._array=null;this._state="find-strings";}
|
| +return;this._json=this._json.slice(bracketIndex+1);var edge_fields_count=this._snapshot.snapshot.meta.edge_fields.length;var edges_length=this._snapshot.snapshot.edge_count*edge_fields_count;this._array=new Uint32Array(edges_length);this._arrayIndex=0;this._state="parse-edges";break;}
|
| +case"parse-edges":{var hasMoreData=this._parseUintArray();this._progress.updateProgress("Loading edges\u2026 %d\%",this._arrayIndex,this._array.length);if(hasMoreData)
|
| +return;this._snapshot.edges=this._array;this._array=null;if(WebInspector.HeapSnapshot.enableAllocationProfiler)
|
| +this._state="find-trace-function-infos";else
|
| +this._state="find-strings";break;}
|
| +case"find-trace-function-infos":{var tracesToken="\"trace_function_infos\"";var tracesTokenIndex=this._json.indexOf(tracesToken);if(tracesTokenIndex===-1)
|
| +return;var bracketIndex=this._json.indexOf("[",tracesTokenIndex);if(bracketIndex===-1)
|
| +return;this._json=this._json.slice(bracketIndex+1);var trace_function_info_field_count=3;var trace_function_info_length=this._snapshot.snapshot.trace_function_count*trace_function_info_field_count;this._array=new Uint32Array(trace_function_info_length);this._arrayIndex=0;this._state="parse-trace-function-infos";break;}
|
| +case"parse-trace-function-infos":{if(this._parseUintArray())
|
| +return;this._snapshot.trace_function_infos=this._array;this._array=null;this._state="find-trace-tree";break;}
|
| +case"find-trace-tree":{var tracesToken="\"trace_tree\"";var tracesTokenIndex=this._json.indexOf(tracesToken);if(tracesTokenIndex===-1)
|
| +return;var bracketIndex=this._json.indexOf("[",tracesTokenIndex);if(bracketIndex===-1)
|
| +return;this._json=this._json.slice(bracketIndex);this._state="parse-trace-tree";break;}
|
| +case"parse-trace-tree":{var stringsToken="\"strings\"";var stringsTokenIndex=this._json.indexOf(stringsToken);if(stringsTokenIndex===-1)
|
| +return;var bracketIndex=this._json.lastIndexOf("]",stringsTokenIndex);this._snapshot.trace_tree=JSON.parse(this._json.substring(0,bracketIndex+1));this._json=this._json.slice(bracketIndex);this._state="find-strings";this._progress.updateStatus("Loading strings\u2026");break;}
|
| case"find-strings":{var stringsToken="\"strings\"";var stringsTokenIndex=this._json.indexOf(stringsToken);if(stringsTokenIndex===-1)
|
| return;var bracketIndex=this._json.indexOf("[",stringsTokenIndex);if(bracketIndex===-1)
|
| return;this._json=this._json.slice(bracketIndex);this._state="accumulate-strings";break;}
|
| -case"accumulate-strings":break;}}};;WebInspector.HeapSnapshotWorkerDispatcher=function(globalObject,postMessage)
|
| +case"accumulate-strings":return;}}}};;WebInspector.HeapSnapshotWorkerDispatcher=function(globalObject,postMessage)
|
| {this._objects=[];this._global=globalObject;this._postMessage=postMessage;}
|
| WebInspector.HeapSnapshotWorkerDispatcher.prototype={_findFunction:function(name)
|
| {var path=name.split(".");var result=this._global;for(var i=0;i<path.length;++i)
|
| -result=result[path[i]];return result;},dispatchMessage:function(event)
|
| -{var data=event.data;var response={callId:data.callId};try{switch(data.disposition){case"create":{var constructorFunction=this._findFunction(data.methodName);this._objects[data.objectId]=new constructorFunction();break;}
|
| +result=result[path[i]];return result;},sendEvent:function(name,data)
|
| +{this._postMessage({eventName:name,data:data});},dispatchMessage:function(event)
|
| +{var data=event.data;var response={callId:data.callId};try{switch(data.disposition){case"create":{var constructorFunction=this._findFunction(data.methodName);this._objects[data.objectId]=new constructorFunction(this);break;}
|
| case"dispose":{delete this._objects[data.objectId];break;}
|
| case"getter":{var object=this._objects[data.objectId];var result=object[data.methodName];response.result=result;break;}
|
| case"factory":{var object=this._objects[data.objectId];var result=object[data.methodName].apply(object,data.methodArguments);if(result)
|
| this._objects[data.newObjectId]=result;response.result=!!result;break;}
|
| case"method":{var object=this._objects[data.objectId];response.result=object[data.methodName].apply(object,data.methodArguments);break;}}}catch(e){response.error=e.toString();response.errorCallStack=e.stack;if(data.methodName)
|
| response.errorMethodName=data.methodName;}
|
| -this._postMessage(response);}};;WebInspector.JSHeapSnapshot=function(profile)
|
| -{this._nodeFlags={canBeQueried:1,detachedDOMTreeNode:2,pageObject:4,visitedMarkerMask:0x0ffff,visitedMarker:0x10000};WebInspector.HeapSnapshot.call(this,profile);}
|
| +this._postMessage(response);}};;WebInspector.JSHeapSnapshot=function(profile,progress)
|
| +{this._nodeFlags={canBeQueried:1,detachedDOMTreeNode:2,pageObject:4,visitedMarkerMask:0x0ffff,visitedMarker:0x10000};this._lazyStringCache={};WebInspector.HeapSnapshot.call(this,profile,progress);}
|
| WebInspector.JSHeapSnapshot.prototype={createNode:function(nodeIndex)
|
| {return new WebInspector.JSHeapSnapshotNode(this,nodeIndex);},createEdge:function(edges,edgeIndex)
|
| {return new WebInspector.JSHeapSnapshotEdge(this,edges,edgeIndex);},createRetainingEdge:function(retainedNodeIndex,retainerIndex)
|
| @@ -376,7 +439,15 @@
|
| {WebInspector.HeapSnapshotNode.call(this,snapshot,nodeIndex)}
|
| WebInspector.JSHeapSnapshotNode.prototype={canBeQueried:function()
|
| {var flags=this._snapshot._flagsOfNode(this);return!!(flags&this._snapshot._nodeFlags.canBeQueried);},isUserObject:function()
|
| -{var flags=this._snapshot._flagsOfNode(this);return!!(flags&this._snapshot._nodeFlags.pageObject);},className:function()
|
| +{var flags=this._snapshot._flagsOfNode(this);return!!(flags&this._snapshot._nodeFlags.pageObject);},name:function(){var snapshot=this._snapshot;if(this._type()===snapshot._nodeConsStringType){var string=snapshot._lazyStringCache[this.nodeIndex];if(typeof string==="undefined"){string=this._consStringName();snapshot._lazyStringCache[this.nodeIndex]=string;}
|
| +return string;}
|
| +return WebInspector.HeapSnapshotNode.prototype.name.call(this);},_consStringName:function()
|
| +{var snapshot=this._snapshot;var consStringType=snapshot._nodeConsStringType;var edgeInternalType=snapshot._edgeInternalType;var edgeFieldsCount=snapshot._edgeFieldsCount;var edgeToNodeOffset=snapshot._edgeToNodeOffset;var edgeTypeOffset=snapshot._edgeTypeOffset;var edgeNameOffset=snapshot._edgeNameOffset;var strings=snapshot._strings;var edges=snapshot._containmentEdges;var firstEdgeIndexes=snapshot._firstEdgeIndexes;var nodeFieldCount=snapshot._nodeFieldCount;var nodeTypeOffset=snapshot._nodeTypeOffset;var nodeNameOffset=snapshot._nodeNameOffset;var nodes=snapshot._nodes;var nodesStack=[];nodesStack.push(this.nodeIndex);var name="";while(nodesStack.length&&name.length<1024){var nodeIndex=nodesStack.pop();if(nodes[nodeIndex+nodeTypeOffset]!==consStringType){name+=strings[nodes[nodeIndex+nodeNameOffset]];continue;}
|
| +var nodeOrdinal=nodeIndex/nodeFieldCount;var beginEdgeIndex=firstEdgeIndexes[nodeOrdinal];var endEdgeIndex=firstEdgeIndexes[nodeOrdinal+1];var firstNodeIndex=0;var secondNodeIndex=0;for(var edgeIndex=beginEdgeIndex;edgeIndex<endEdgeIndex&&(!firstNodeIndex||!secondNodeIndex);edgeIndex+=edgeFieldsCount){var edgeType=edges[edgeIndex+edgeTypeOffset];if(edgeType===edgeInternalType){var edgeName=strings[edges[edgeIndex+edgeNameOffset]];if(edgeName==="first")
|
| +firstNodeIndex=edges[edgeIndex+edgeToNodeOffset];else if(edgeName==="second")
|
| +secondNodeIndex=edges[edgeIndex+edgeToNodeOffset];}}
|
| +nodesStack.push(secondNodeIndex);nodesStack.push(firstNodeIndex);}
|
| +return name;},className:function()
|
| {var type=this.type();switch(type){case"hidden":return"(system)";case"object":case"native":return this.name();case"code":return"(compiled code)";default:return"("+type+")";}},classIndex:function()
|
| {var snapshot=this._snapshot;var nodes=snapshot._nodes;var type=nodes[this.nodeIndex+snapshot._nodeTypeOffset];;if(type===snapshot._nodeObjectType||type===snapshot._nodeNativeType)
|
| return nodes[this.nodeIndex+snapshot._nodeNameOffset];return-1-type;},id:function()
|
| @@ -473,10 +544,9 @@
|
| {this._closed=true;if(this._writeCallbacks.length)
|
| return;WebInspector.fileManager.removeEventListener(WebInspector.FileManager.EventTypes.AppendedToURL,this._onAppendDone,this);WebInspector.fileManager.close(this._fileName);},_onAppendDone:function(event)
|
| {if(event.data!==this._fileName)
|
| -return;if(!this._writeCallbacks.length){if(this._closed){WebInspector.fileManager.removeEventListener(WebInspector.FileManager.EventTypes.AppendedToURL,this._onAppendDone,this);WebInspector.fileManager.close(this._fileName);}
|
| -return;}
|
| -var callback=this._writeCallbacks.shift();if(callback)
|
| -callback(this);}};Object.isEmpty=function(obj)
|
| +return;var callback=this._writeCallbacks.shift();if(callback)
|
| +callback(this);if(!this._writeCallbacks.length){if(this._closed){WebInspector.fileManager.removeEventListener(WebInspector.FileManager.EventTypes.AppendedToURL,this._onAppendDone,this);WebInspector.fileManager.close(this._fileName);}}}};WebInspector.UIString=function(string,vararg)
|
| +{return String.vsprintf(string,Array.prototype.slice.call(arguments,1));};Object.isEmpty=function(obj)
|
| {for(var i in obj)
|
| return false;return true;}
|
| Object.values=function(obj)
|
| @@ -518,7 +588,7 @@
|
| return 1;if(this<other)
|
| return-1;return 0;}
|
| function sanitizeHref(href)
|
| -{return href&&href.trim().toLowerCase().startsWith("javascript:")?"":href;}
|
| +{return href&&href.trim().toLowerCase().startsWith("javascript:")?null:href;}
|
| String.prototype.removeURLFragment=function()
|
| {var fragmentIndex=this.indexOf("#");if(fragmentIndex==-1)
|
| fragmentIndex=this.length;return this.substring(0,fragmentIndex);}
|
| @@ -570,14 +640,15 @@
|
| {function swap(array,i1,i2)
|
| {var temp=array[i1];array[i1]=array[i2];array[i2]=temp;}
|
| var pivotValue=this[pivotIndex];swap(this,right,pivotIndex);var storeIndex=left;for(var i=left;i<right;++i){if(comparator(this[i],pivotValue)<0){swap(this,storeIndex,i);++storeIndex;}}
|
| -swap(this,right,storeIndex);return storeIndex;}};Object.defineProperty(Array.prototype,"partition",partition);Object.defineProperty(Uint32Array.prototype,"partition",partition);var sortRange={value:function(comparator,leftBound,rightBound,k)
|
| -{function quickSortFirstK(array,comparator,left,right,k)
|
| +swap(this,right,storeIndex);return storeIndex;}};Object.defineProperty(Array.prototype,"partition",partition);Object.defineProperty(Uint32Array.prototype,"partition",partition);var sortRange={value:function(comparator,leftBound,rightBound,sortWindowLeft,sortWindowRight)
|
| +{function quickSortRange(array,comparator,left,right,sortWindowLeft,sortWindowRight)
|
| {if(right<=left)
|
| -return;var pivotIndex=Math.floor(Math.random()*(right-left))+left;var pivotNewIndex=array.partition(comparator,left,right,pivotIndex);quickSortFirstK(array,comparator,left,pivotNewIndex-1,k);if(pivotNewIndex<left+k-1)
|
| -quickSortFirstK(array,comparator,pivotNewIndex+1,right,left+k-1-pivotNewIndex);}
|
| -if(leftBound===0&&rightBound===(this.length-1)&&k>=this.length)
|
| +return;var pivotIndex=Math.floor(Math.random()*(right-left))+left;var pivotNewIndex=array.partition(comparator,left,right,pivotIndex);if(sortWindowLeft<pivotNewIndex)
|
| +quickSortRange(array,comparator,left,pivotNewIndex-1,sortWindowLeft,sortWindowRight);if(pivotNewIndex<sortWindowRight)
|
| +quickSortRange(array,comparator,pivotNewIndex+1,right,sortWindowLeft,sortWindowRight);}
|
| +if(leftBound===0&&rightBound===(this.length-1)&&sortWindowLeft===0&&sortWindowRight>=rightBound)
|
| this.sort(comparator);else
|
| -quickSortFirstK(this,comparator,leftBound,rightBound,k);return this;}}
|
| +quickSortRange(this,comparator,leftBound,rightBound,sortWindowLeft,sortWindowRight);return this;}}
|
| Object.defineProperty(Array.prototype,"sortRange",sortRange);Object.defineProperty(Uint32Array.prototype,"sortRange",sortRange);})();Object.defineProperty(Array.prototype,"qselect",{value:function(k,comparator)
|
| {if(k<0||k>=this.length)
|
| return;if(!comparator)
|
| @@ -733,8 +804,7 @@
|
| throw"recursion depth limit reached in StringPool.deepIntern(), perhaps attempting to traverse cyclical references?";for(var field in obj){switch(typeof obj[field]){case"string":obj[field]=this.intern(obj[field]);break;case"object":this.internObjectStrings(obj[field],depthLimit);break;}}}}
|
| var _importedScripts={};function importScript(scriptName)
|
| {if(_importedScripts[scriptName])
|
| -return;var xhr=new XMLHttpRequest();_importedScripts[scriptName]=true;if(window.flattenImports)
|
| -scriptName=scriptName.split("/").reverse()[0];xhr.open("GET",scriptName,false);xhr.send(null);if(!xhr.responseText)
|
| +return;var xhr=new XMLHttpRequest();_importedScripts[scriptName]=true;xhr.open("GET",scriptName,false);xhr.send(null);if(!xhr.responseText)
|
| throw"empty response arrived for script '"+scriptName+"'";var sourceURL=WebInspector.ParsedURL.completeURL(window.location.href,scriptName);window.eval(xhr.responseText+"\n//# sourceURL="+sourceURL);}
|
| var loadScript=importScript;function CallbackBarrier()
|
| {this._pendingIncomingCallbacksCount=0;}
|
| @@ -746,11 +816,4 @@
|
| if(!--this._pendingIncomingCallbacksCount&&this._outgoingCallback)
|
| this._outgoingCallback();}};function postMessageWrapper(message)
|
| {postMessage(message);}
|
| -WebInspector.WorkerConsole=function()
|
| -{}
|
| -WebInspector.WorkerConsole.prototype={log:function(var_args)
|
| -{this._postMessage("log",Array.prototype.slice.call(arguments));},error:function(var_args)
|
| -{this._postMessage("error",Array.prototype.slice.call(arguments));},info:function(var_args)
|
| -{this._postMessage("info",Array.prototype.slice.call(arguments));},trace:function()
|
| -{this.log(new Error().stack);},_postMessage:function(method,args)
|
| -{var rawMessage={object:"console",method:method,arguments:args};postMessageWrapper(rawMessage);}};var dispatcher=new WebInspector.HeapSnapshotWorkerDispatcher(this,postMessageWrapper);addEventListener("message",dispatcher.dispatchMessage.bind(dispatcher),false);console=new WebInspector.WorkerConsole();
|
| +var dispatcher=new WebInspector.HeapSnapshotWorkerDispatcher(this,postMessageWrapper);addEventListener("message",dispatcher.dispatchMessage.bind(dispatcher),false);
|
|
|