<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196678</bug_id>
          
          <creation_ts>2019-04-06 06:49:03 -0700</creation_ts>
          <short_desc>JavaScriptCore stop execute javascript on missing pair bracket</short_desc>
          <delta_ts>2020-07-18 09:00:00 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yen-Chin, Lee">coldnew.tw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>coldnew.tw</cc>
    
    <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1525019</commentid>
    <comment_count>0</comment_count>
      <attachid>366886</attachid>
    <who name="Yen-Chin, Lee">coldnew.tw</who>
    <bug_when>2019-04-06 06:49:03 -0700</bug_when>
    <thetext>Created attachment 366886
TestCase, firefox and Chrome will show green rectangle, webkit keep it red

When javascript missing pair bracket, like following:

    var oldRectangle = $(&apos;[id^=&quot;rectangle&quot;&apos;).parent();

Webkit will stop execute other javascript and throw following error:
 
  [Error] Error: Syntax error, unrecognized expression: [id^=&quot;rectangle&quot;
	  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 = $(&apos;[id^=&quot;rectangle&quot;]&apos;).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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525020</commentid>
    <comment_count>1</comment_count>
    <who name="Yen-Chin, Lee">coldnew.tw</who>
    <bug_when>2019-04-06 06:50:20 -0700</bug_when>
    <thetext>This issue may duplicate with #173537, but #173537 can&apos;t reproduce this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1672804</commentid>
    <comment_count>2</comment_count>
    <who name="Yen-Chin, Lee">coldnew.tw</who>
    <bug_when>2020-07-18 09:00:00 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>366886</attachid>
            <date>2019-04-06 06:49:03 -0700</date>
            <delta_ts>2019-04-06 06:49:03 -0700</delta_ts>
            <desc>TestCase, firefox and Chrome will show green rectangle, webkit keep it red</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>890</size>
            <attacher name="Yen-Chin, Lee">coldnew.tw</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgICA8aGVhZD4KCTx0aXRsZT4gVGVzdCBvbiBtaXNzaW5nIHBhaXIgYnJhY2tldCA8
L3RpdGxlPgoJPHNjcmlwdCBzcmM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