mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
Bug 1024774 - Part 7: Add HeapSnapshot WebIDL interface; r=bholley
This commit is contained in:
parent
e355bde685
commit
3641c12115
@ -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'
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
12
dom/webidl/HeapSnapshot.webidl
Normal file
12
dom/webidl/HeapSnapshot.webidl
Normal 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 {
|
||||
};
|
@ -162,6 +162,7 @@ WEBIDL_FILES = [
|
||||
'GetUserMediaRequest.webidl',
|
||||
'HDMIInputPort.webidl',
|
||||
'Headers.webidl',
|
||||
'HeapSnapshot.webidl',
|
||||
'History.webidl',
|
||||
'HTMLAllCollection.webidl',
|
||||
'HTMLAnchorElement.webidl',
|
||||
|
Loading…
x
Reference in New Issue
Block a user