RESOLVED FIXED196678
JavaScriptCore stop execute javascript on missing pair bracket
https://bugs.webkit.org/show_bug.cgi?id=196678
Summary JavaScriptCore stop execute javascript on missing pair bracket
Yen-Chin, Lee
Reported 2019-04-06 06:49:03 PDT
Created attachment 366886 [details] TestCase, firefox and Chrome will show green rectangle, webkit keep it red When javascript missing pair bracket, like following: var oldRectangle = $('[id^="rectangle"').parent(); Webkit will stop execute other javascript and throw following error: [Error] Error: Syntax error, unrecognized expression: [id^="rectangle" error (jquery-1.12.4.min.js:2:12788) tokenize (jquery-1.12.4.min.js:2:18792) select (jquery-1.12.4.min.js:2:21596) fa (jquery-1.12.4.min.js:2:7322) find (jquery-1.12.4.min.js:2:24114) init (jquery-1.12.4.min.js:2:24681) n (jquery-1.12.4.min.js:2:420) Global Code (index.html:25) If I fixed the javascript syntax to: var oldRectangle = $('[id^="rectangle"]').parent(); All error gone. This is due to WRONG syntax on javascript, but Firefox and Chrome they will fix the javascript syntax and will not throw any error. The attatchement can test this problem, on Firefox/Chrome the result rectangle is in Green, but use webkit to render it, the color will be Red.
Attachments
TestCase, firefox and Chrome will show green rectangle, webkit keep it red (890 bytes, text/html)
2019-04-06 06:49 PDT, Yen-Chin, Lee
no flags
Yen-Chin, Lee
Comment 1 2019-04-06 06:50:20 PDT
This issue may duplicate with #173537, but #173537 can't reproduce this issue.
Yen-Chin, Lee
Comment 2 2020-07-18 09:00:00 PDT
This problem is found on webkitgtk 24 or below version, and fixed on webkitgtk (or the same version in Safari) 26. The testcase is now show gree rectangle after webkitgtk 26, so closed this issue.
Note You need to log in before you can comment on or make changes to this bug.