perf: force GC on profiles
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
library angular.core.facade.dom;
|
||||
|
||||
import 'dart:html';
|
||||
import 'dart:js' show JsObject;
|
||||
import 'dart:js' show JsObject, context;
|
||||
|
||||
export 'dart:html' show DocumentFragment, Node, Element, TemplateElement, Text, document, location, window;
|
||||
|
||||
@ -11,6 +11,15 @@ class IdentitySanitizer implements NodeTreeSanitizer {
|
||||
void sanitizeTree(Node node) {}
|
||||
}
|
||||
|
||||
var _window = context['window'];
|
||||
var _gc = context['gc'];
|
||||
|
||||
gc() {
|
||||
if (_gc != null) {
|
||||
_gc.apply(const []);
|
||||
}
|
||||
}
|
||||
|
||||
final identitySanitizer = new IdentitySanitizer();
|
||||
|
||||
class DOM {
|
||||
|
@ -7,6 +7,7 @@ export var Element = window.HTMLElement;
|
||||
export var TemplateElement = window.HTMLTemplateElement;
|
||||
export var document = window.document;
|
||||
export var location = window.location;
|
||||
export var gc = window.gc ? () => window.gc() : () => null;
|
||||
|
||||
import {List, MapWrapper, ListWrapper} from 'facade/collection';
|
||||
|
||||
|
Reference in New Issue
Block a user