@catch is calling then which may be controlled by user scripts. It is better to rewrite the code from @catch(...) to @then(undefined,...).
Created attachment 266185 [details] Patch
(In reply to comment #0) > @catch is calling then which may be controlled by user scripts. > It is better to rewrite the code from @catch(...) to @then(undefined,...). I like the patch, it solves the issue. There's an alternative though that might keep some readability in patches as you wouldn't need to so @then(undefined, ...) and would be using @then instead of then for the catch implementation. That might even make other code more robust.
(In reply to comment #2) > @then(undefined, ...) and would be using @then instead of then for the catch > implementation. That might even make other code more robust. If you decide to do this, do not forget to change the bug description.
(In reply to comment #2) > (In reply to comment #0) > > @catch is calling then which may be controlled by user scripts. > > It is better to rewrite the code from @catch(...) to @then(undefined,...). > > I like the patch, it solves the issue. There's an alternative though that > might keep some readability in patches as you wouldn't need to so > @then(undefined, ...) and would be using @then instead of then for the catch > implementation. That might even make other code more robust. The catch method is defined in the spec so as to rely on the "then" property, which makes that approach impossible. We could write @catch with a new JS code that would call @then, but I don't think the improved readability is sufficient to make that appealing.
(In reply to comment #4) > The catch method is defined in the spec so as to rely on the "then" > property, which makes that approach impossible. I suspected that, yes. > We could write @catch with a new JS code that would call @then, but I don't > think the improved readability is sufficient to make that appealing. Agree.
Comment on attachment 266185 [details] Patch Clearing flags on attachment: 266185 Committed r192865: <http://trac.webkit.org/changeset/192865>
All reviewed patches have been landed. Closing bug.