Closed calixteman closed 1 year ago
I have a set of almost 50k PDFs crawled from the web, and it looks like no one (except the one from #12593) is using toSource
.
I guess we can use https://github.com/marcello3d/node-tosource/blob/master/src/tosource.ts to implement it, but it shouldn't be a priority at all.
Should we perhaps just WONTFIX this issue, given the problems outlined above and the fact that we've only seen a single example of this actually being used?
This method has only been implemented in Firefox but it has been deprecated and it isn't usable anymore: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource It isn't implemented in quickjs. Sadly, the function appears in some examples in the spec: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pd and it's used in real life:
The code is still in mozilla-central: https://hg.mozilla.org/mozilla-central/file/9b7bac5af873863628d90e89299a813228ddbb83/js/src/vm/ToSource.cpp https://hg.mozilla.org/mozilla-central/file/9b7bac5af873863628d90e89299a813228ddbb83/js/src/builtin/Object.cpp#l271
I'm not sure that's a good idea to implement such a function...