News for hackers. Stuff that matters.
Re:Goodbye “undefined is not a function” by paulirish on Sunday February 22, 2015 @04:59PM (#9091337)
This change required adding a pretty-printer into V8 to massage that AST back to something recognizable: https://codereview.chromium.org/861623002

Still, there are decent improvements we could make. Star, or better yet, comment on https://code.google.com/p/chromium/issues/detail?id=259443 with how you get caught out by weak error messages. We want the debugging cycle to be a lot more direct from error to fix.

Re:Goodbye “undefined is not a function” by evilpie on Sunday February 22, 2015 @06:05PM (#9091640)
SpiderMonkey has something that we call ExpressionDecompiler [1]. Basically it allows us to decompile some subset of the JS bytecode. Fun fact: At some point in time SpiderMonkey could actually decompile all bytecode and this is how we used to generate the result of Function#toString. [2]

[1] https://dxr.mozilla.org/mozilla-central/search?q=ExpressionD... [2] https://bugzilla.mozilla.org/show_bug.cgi?id=718969

Re:Goodbye “undefined is not a function” by notatoad on Sunday February 22, 2015 @11:40PM (#9092583)
It doesn't seem relevant to the bug you posted, but as long as you're here... I'm always annoyed by the vagueness of JSON.parse syntax errors. Instead of showing the source file and line number of the call to json.parse (or even better the location of the syntax error in the json string it failed to parse) I get "uncaught syntax error in index.html:1". I know now that that usually means i've forgotten to wrap a json.parse in a try..catch, but it's caught me out a few times.
Re:Goodbye “undefined is not a function” by po on Sunday February 22, 2015 @07:18PM (#9091871)
Thank you. This will save so much development time globally.

Please also look into the "Script error" message. I know it is intentionally non-descript to prevent leaking information about cross domain requests but there has to be something that is safe to report that will help developers narrow down what is causing it.

Re:Goodbye “undefined is not a function” by jon-wood on Monday February 23, 2015 @04:36AM (#9093387)
Given developers can usually narrow it down after a bit of trial and error I see no reason to obfuscate this. By its nature all the source is available to anyone asking, so let's just stop making CORS debugging such a pain.
Re:Goodbye “undefined is not a function” by inglor on Sunday February 22, 2015 @07:31PM (#9091905)
Hey Paul great work! Any idea on when the promises support in the dev tools is landing?
Re:Goodbye “undefined is not a function” by tootie on Sunday February 22, 2015 @05:38PM (#9091534)
Can it throw an exception when we're using a js library that isn't cool anymore?
Re:Goodbye “undefined is not a function” by FLUX-YOU on Sunday February 22, 2015 @05:47PM (#9091572)
Exceptions as a service.js