googlearchive / caja

Caja is a tool for safely embedding third party HTML, CSS and JavaScript in your website.
Apache License 2.0
1.13k stars 113 forks source link

Caja is using Proxy.create #1947

Open kpreid opened 9 years ago

kpreid commented 9 years ago

Original issue 1949 created by evilpies on 2014-12-20T15:19:29.000Z:

While debugging a Firefox crash (bugzil.la/1113980), I came across code that suggests that Caja is still using Proxy.create. We have plans to remove the old API in the future (bugzil.la/892903), so it would be good if Caja started using the new API.

Does Caja work without Proxy.create? Do you have any idea how long replacing Proxy.create is going to take?

Thank you, Tom

kpreid commented 9 years ago

Comment #1 originally posted by erights@google.com on 2014-12-22T17:15:55.000Z:

Thanks for reporting this. It does indeed need to be updated to the ES6 API.

kpreid commented 9 years ago

Comment #2 originally posted by kpreid.switchb.org on 2014-12-22T17:21:32.000Z:

There's a catch here, which is why we haven't done this already. ES5/3 emulates the Proxy.create API, and Domado depends on using proxies in both ES5 and ES5/3 mode. Thus, we can't do this update until we're actually completely dropping support for ES5/3 (or we want to deal with more complicated backports). But that should be possible soon.

That said, I don't see any reason not to prepare the changes in anticipation.

evilpie commented 8 years ago

Proxy.create now shows a warning in Firefox Nightly. I plan to remove this API as soon as possible.

kpreid commented 8 years ago

Chrome 49 removed Proxy.create. I thought we were safe via feature tests but ES5/3 had a poorly written test. Fixed that in commit 78af8b82e56f9cab2f899d0ef22c912afb603810. (This issue is still about upgrading our Proxy usage entirely.)

erights commented 4 years ago

I am no longer contributing to Caja, so I am unassigning myself. For those using the JavaScript component of Caja, I recommend the modern SES instead.