[Bug 28505] New: Synchronous XHR removal makes patching Error.prepareStackTrace impossible

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28505

            Bug ID: 28505
           Summary: Synchronous XHR removal makes patching
                    Error.prepareStackTrace impossible
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XHR
          Assignee: annevk@annevk.nl
          Reporter: evan.exe@gmail.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

I've got a library that fixes Error.prototype.stack in V8 to work with source
maps because Google refuses to fix this themselves (http://crbug.com/376409).
However, it's recently come to my attention
(https://github.com/evanw/node-source-map-support/issues/49) that this is about
to break due to removal of synchronous XHR
(https://xhr.spec.whatwg.org/#sync-warning).

Because of the way the API Error.prepareStackTrace API works, I need to fetch
the source map before returning from the callback. I can't know what the URLs
will be ahead of time and fetch them because 1) errors may happen before the
source map download completes and 2) new code with the "//# sourceMappingURL"
pragma can be created with eval at any time.

I understand the goals of removing synchronous XHR but my library legitimately
needs this feature. Breaking this feature will greatly harm debugging for
languages that are cross-compiled to JavaScript. The slowness of synchronous
XHR doesn't matter here because it's just for debugging, not for production
environments.

What are people's thoughts on this? Is there maybe some way to add a way in the
spec to still allow synchronous XHR in certain circumstances?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 17 April 2015 16:58:25 UTC