Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Microsoft EdgeHTML 15 Browser Tools hooking into zone.js #817

@wizarrc

Description

@wizarrc

Originally Fixed in pull request #155 but now with EdgeHTML 15, the browser tools are hooking in at a different callback function.

https://github.com/angular/zone.js/blob/master/lib/common/utils.ts#L368

The latest version of Edge, data.handler.toString() does not return [object FunctionWrapper] but function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] } instead. I made changes locally on my machine to zone.js/utils.ts to see if the browser events would go away in my performance tab, and sure enough they did. This seems to unnecessarily hook into zone.js, causing a lot of calls when testing performance.

Can anyone confirm this issue is back in EdgeHTML 15? There should be a better way than just check a string, because they have seemed to changed their internal function. Anyways, below is my local changes and works on my machine.

var testString = data.handler.toString();
validZoneHandler = data.handler && (testString === '[object FunctionWrapper]' || testString == 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }');

Update
Actually this code looks more correct as it handles the null check properly.

if(data.handler) {
  var testString = data.handler.toString();
  validZoneHandler = testString === '[object FunctionWrapper]' || testString == 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions