confluence icon indicating copy to clipboard operation
confluence copied to clipboard

Proxy.revocable is not detected in Edge 16

Open foolip opened this issue 6 years ago • 2 comments

See https://github.com/mdn/browser-compat-data/pull/3313#pullrequestreview-194598103. Proxy.revocable is thought by Confluence to be added in Edge 17, but this appears to be incorrect.

"revocable" is in https://github.com/mdittmer/web-apis/blob/master/data/og/window_Edge_16.16299_Windows_10.0.json, so there's probably something wrong with the heuristic. @mdittmer can you help me check what condition is failing here?

foolip avatar Jan 22 '19 10:01 foolip

The symptom here appears to be that Proxy.prototype does not exist in Edge 16. Its existence is one of the heuristics used to discover properties on window that appear to be constructors, and therefore should be processed for Ctor.someFn detection of static methods.

What's curious is that it appears to be missing from Edge 17 too, so some other aspect of the object graph walk must be discovering it in Edge 17 and not Edge 16. I will continue to investigate.

mdittmer avatar Jan 22 '19 18:01 mdittmer

This appears to be the problem:

  • In Edge 16 and 17 Proxy does not present as a constructor because it has no .prototype; it is never added to the list of global constructors to be checked for static methods;
  • In Edge 16 Proxy does present as a function because it has arguments and length properties; this excludes it from the set of global libraries (like Math) that are also checked for functions/static methods
  • In Edge 17 Proxy does not present as a function because it has no arguments property; hence it is treated as a global library and Proxy.revocable is detected.

Hence, the heuristics suggest (incorrectly) that Proxy.revocable was added in Edge 17. @foolip are there spec'd requirements that correspond to these heuristics? Should Proxy have a .prototype and/or .arguments?

mdittmer avatar Jan 22 '19 19:01 mdittmer