Bug 1024774 - Part 7: Add HeapSnapshot WebIDL interface; r=bholley

This commit is contained in:
Nick Fitzgerald 2015-05-28 07:37:42 -07:00
parent e355bde685
commit 3641c12115
4 changed files with 26 additions and 1 deletions

View File

@ -271,7 +271,7 @@ DOMInterfaces = {
# collection of static methods, so we have this `concrete: False` hack.
'concrete': False,
'nativeType': 'mozilla::devtools::ChromeUtils',
'implicitJSContext': ['saveHeapSnapshot']
'implicitJSContext': ['readHeapSnapshot', 'saveHeapSnapshot']
},
'ChromeWindow': {
@ -509,6 +509,10 @@ DOMInterfaces = {
'headerFile': 'nsGeolocation.h'
},
'HeapSnapshot': {
'nativeType': 'mozilla::devtools::HeapSnapshot'
},
'History': {
'headerFile': 'nsHistory.h',
'nativeType': 'nsHistory'

View File

@ -20,6 +20,14 @@ interface ChromeUtils {
[Throws]
static void saveHeapSnapshot(DOMString filePath,
optional HeapSnapshotBoundaries boundaries);
/**
* Deserialize a core dump into a HeapSnapshot.
*
* @param filePath The file path to read the core dump from.
*/
[Throws, NewObject]
static HeapSnapshot readHeapSnapshot(DOMString filePath);
};
/**

View File

@ -0,0 +1,12 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/**
* A HeapSnapshot represents a snapshot of the heap graph
*/
[ChromeOnly, Exposed=(Window,System)]
interface HeapSnapshot {
};

View File

@ -162,6 +162,7 @@ WEBIDL_FILES = [
'GetUserMediaRequest.webidl',
'HDMIInputPort.webidl',
'Headers.webidl',
'HeapSnapshot.webidl',
'History.webidl',
'HTMLAllCollection.webidl',
'HTMLAnchorElement.webidl',