RESOLVED FIXED 25418
Remove new lines from the listener function wrappers
https://bugs.webkit.org/show_bug.cgi?id=25418
Summary Remove new lines from the listener function wrappers
Yury Semikhatsky
Reported 2009-04-27 04:14:10 PDT
V8LazyEventListener::getWrappedListenerFunction uses '\n' characters in the JavaScript code of the listener function wrapper. It requires additional logic when debugging pages to translate line numbers from the wrapper snippet to the original source. It seems that we can safely change the wrapper into a one-line expression and have line numbers of the wrapped handler to be the same as in the original code.
Attachments
Patch removing all new line characters from the handler wrapper. (1.89 KB, patch)
2009-04-27 04:18 PDT, Yury Semikhatsky
no flags
Remove all new lines except those going right after the original code (2.93 KB, patch)
2009-04-28 06:35 PDT, Yury Semikhatsky
dglazkov: review-
Patch with Changelog entry (3.19 KB, patch)
2009-05-08 08:19 PDT, Yury Semikhatsky
dglazkov: review+
Yury Semikhatsky
Comment 1 2009-04-27 04:18:01 PDT
Created attachment 29817 [details] Patch removing all new line characters from the handler wrapper.
Sam Weinig
Comment 2 2009-04-27 07:33:33 PDT
You should ensure that listeners specificed with a // style comment at the end still function correctly.
Yury Semikhatsky
Comment 3 2009-04-28 06:35:28 PDT
Created attachment 29843 [details] Remove all new lines except those going right after the original code
Yury Semikhatsky
Comment 4 2009-04-28 06:37:38 PDT
Fixed. I left one '\n' after the wrapped code so that //-style comments don't break the wrapper code. (In reply to comment #2) > You should ensure that listeners specificed with a // style comment at the end > still function correctly. >
Dimitri Glazkov (Google)
Comment 5 2009-05-08 07:54:36 PDT
Comment on attachment 29843 [details] Remove all new lines except those going right after the original code Code looks good, but ChangeLog entry is missing.
Yury Semikhatsky
Comment 6 2009-05-08 08:19:15 PDT
Created attachment 30130 [details] Patch with Changelog entry
Yury Semikhatsky
Comment 7 2009-05-08 08:24:38 PDT
(In reply to comment #5) > (From update of attachment 29843 [details] [review]) > Code looks good, but ChangeLog entry is missing. > I've added ChangeLog entry.
Dimitri Glazkov (Google)
Comment 8 2009-05-14 09:00:17 PDT
Comment on attachment 30130 [details] Patch with Changelog entry Next time, please add a URL to the ChangeLog entry: http://webkit.org/coding/contributing.html
Dimitri Glazkov (Google)
Comment 9 2009-05-14 09:15:10 PDT
Note You need to log in before you can comment on or make changes to this bug.