harmony-reflect icon indicating copy to clipboard operation
harmony-reflect copied to clipboard

Collected documentation/discussion of implementation issues

Open ghost opened this issue 13 years ago • 2 comments

I'm not sure where this would best exist, if anywhere at all, but it seems like it's already been useful just pulling together notes on a few bugs and issues with the various implementations and continuing iteration of those. While they should always be reported as bugs to the tracker for the implementation first, it still seems useful to note them and workarounds for the short term, and also as a kind of historical documentation of the various issues that inevitably come up along the way in implementing new APIs, especially one this grandiose. Individual bug tracs have a tendency to get deeply buried amongst the mountain of issues filed in engine repo history logs without much context to draw from after the fact.

ghost avatar May 31 '12 09:05 ghost

I agree. The issue tracker for this project already gives us a good history, but it's not a very nice summary of the current "pitfalls". We could start with a simple file that lists the known issues under the doc directory. I also intend to update the API docs with some notes of warning in the appropriate traps.

tvcutsem avatar May 31 '12 17:05 tvcutsem

Just noting this here for the moment so I don't forget (I do plan to write up a page on this as mentioned above). Two chrome bugs:

  • V8 returns false for JSProxy->IsObject(); Unless they change this it's going to continue having widespread consequences. The most visible currently is that proxies are unlabeled in the dev tools in chrome, which rely on "internalConstructorName" (JSProxy->ConstructorName doesn't exist) and also check IsObject.

http://code.google.com/p/chromium/issues/detail?id=139774

  • function proxies can't be used as DOM event listeners in Chrome at all. Probably related to IsObject returning false but I haven't traced its actual root cause so I don't know. If you try to do something like document.body.onclick = Proxy.createFunction({}, function(){}) document.body.onclick will be set to null (if it wasn't already). document.body.addEventListener('click', functionProxy) will never receive callbacks. (my current workaround is to just wrap the proxy in a minimal actual function when I need a proxy DOM event handler, as I do when bridging between two JS heaps, https://github.com/appjs/appjs/blob/master/lib/bridge.js#L242).

http://code.google.com/p/chromium/issues/detail?id=140160

ghost avatar Aug 02 '12 11:08 ghost