Summary: | JavaScript debugger also warns about errors in try..catch blocks. | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Diederik van der Boor <vdboor> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mail-kdebugs, maksim, ricardo |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Diederik van der Boor
2008-10-07 14:13:15 UTC
Yeah... I picked the current behavior based on my experience dealing with bug reports on websites, since it's not uncommon for them to hide problems in try/catch, but I can see how it'd be annoying in properly written code... Thanks for the feedback. Do you have any update on this bug? I still experience it with KDE 4.2.3 and it's quite annoying because just about every site reports errors with "Iterator" or CreateObject(). When I disable the checkbox to report in excepions it will be on again when konqueror restarts. This is a problem that's still present today (November 2010) on the current version which is 4.5.3. This seems to be causing an error in some javascript libraries, namely mootools 1.3. Basically it means that konqueror can't run mootools 1.3 code properly which will probably mean that some sites will start to break. It's no longer a question of reporting too many bugs, but of halting JS execution altogether. Here is one of such problems: https://mootools.lighthouseapp.com/projects/2706/tickets/1082-error-loading-mootools-13-on-konqueror#ticket-1082-7 Do you have an actual testcase? The debugger reporting that the exception happened has nothing to do with normal execution. OK, never mind that --- the actual mootools problem appears to be a regression from #239957, which is rather weird since that follows the behavior of the spec --- 3rd edition, 8.6.2.2, #4 ("the attributes of the property are not changed") Simple testcase would be: o = []; for (a in Array.prototype) o.push(a); o.join(",") Array.prototype.slice = 42 o = []; for (a in Array.prototype) o.push(a); o.join(",") (this shows up in the mootools 'force' method stuff, which does things like propagate Array.prototype.slice -> Array.slice) Perhaps the DontEnum flag is excluded? I should check the 5th edition, I guess. Actually, never mind that. That's a Chrome bug; that doesn't happen in FF. The reason it works *there* is that you can delete things from Array.prototype (plus Array.slice is already included anyway). Here is a good diagnostic testcase (it may be of some use to forward this info to mootools people, as the initial diagnosis is completely wrong!): <script> function doLog(msg) { var b = document.createElement("div"); b.appendChild(document.createTextNode(msg)); document.getElementById("log").appendChild(b); } function props(o) { var p = []; for (pn in o) p.push(pn); return p.join(",") } function test() { doLog("Array.slice:" + Array.slice); doLog("Array.prototype.slice:" + Array.prototype.slice); doLog("Initial array.prototype properties:" + props(Array.prototype)); Array.prototype.slice = 42; doLog("Enumerable after setting a method:" + props(Array.prototype)); doLog("Array.prototype.slice:" + Array.prototype.slice); delete Array.prototype.slice; doLog("After delete:" + Array.prototype.slice); Array.prototype.slice = 42; doLog("Enumerable after adding a 42:" + props(Array.prototype)); } </script> <body onload="test()"> <div id="log"> And here is output, with my notes (based on 3rd edition, 5th edition might change stuff): -------------------- Our output (and the same for QtWebKit 4.7 --- odd!): -------------------- Array.slice:undefined Array.prototype.slice: function slice() { [native code] } Initial array.prototype properties: Enumerable after setting a method: Array.prototype.slice:42 After delete: function slice() { [native code] } <-- ** bug? (but hard to fix)** Enumerable after adding a 42: <-- ** due to above ** -------------------- Output from Chrome 5: -------------------- Array.slice:undefined Array.prototype.slice:function slice() { [native code] } Initial array.prototype properties: Enumerable after setting a method:slice <-- ** bug, which helps mootools ** Array.prototype.slice:42 After delete:function slice() { [native code] } <-- ** bug ** Enumerable after adding a 42:slice -------------------- Output from FF4 beta: -------------------- Array.slice:function slice() { [native code] } <-- ** extension? *** Array.prototype.slice:function slice() { [native code] } Initial array.prototype properties: Enumerable after setting a method: Array.prototype.slice:42 After delete:undefined Enumerable after adding a 42:slice Thank you for the bug report. As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. I've stopped using KDE long ago (on a mac here), but I doubt the issue is still present, given how long it's ago. |