Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / HeapSnapshotLoader.js
index 9f5a0cb..132886f 100644 (file)
@@ -58,15 +58,12 @@ WebInspector.HeapSnapshotLoader.prototype = {
     },
 
     /**
-     * @param {string} constructorName
-     * @return {T}
-     * @template T
+     * @return {!WebInspector.JSHeapSnapshot}
      */
     buildSnapshot: function(constructorName)
     {
         this._progress.updateStatus("Processing snapshot\u2026");
-        var constructor = WebInspector[constructorName];
-        var result = new constructor(this._snapshot, this._progress);
+        var result = new WebInspector.JSHeapSnapshot(this._snapshot, this._progress);
         this._reset();
         return result;
     },
@@ -195,7 +192,8 @@ WebInspector.HeapSnapshotLoader.prototype = {
                     return;
                 this._snapshot.edges = this._array;
                 this._array = null;
-                if (WebInspector.HeapSnapshot.enableAllocationProfiler)
+                // If there is allocation info parse it, otherwise jump straight to strings.
+                if (this._snapshot.snapshot.trace_function_count)
                     this._state = "find-trace-function-infos";
                 else
                     this._state = "find-strings";