Bug 187694

Summary: [GLIB] Add jsc_context_check_syntax() to GLib API
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: Gtk, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ysuzuki: review-
Updated patch ysuzuki: review+

Description Carlos Garcia Campos 2018-07-16 05:38:03 PDT
A wrapper for JSCheckScriptSyntax to be able to check for syntax errors without actually evaluating the code.
Comment 1 Carlos Garcia Campos 2018-07-16 05:39:38 PDT
Created attachment 345090 [details]
Patch
Comment 2 Yusuke Suzuki 2018-07-16 07:00:11 PDT
Comment on attachment 345090 [details]
Patch

Looks good. But, I think this API does not consider about ES6 modules.
Module and Script have different syntax elements. For example, `import` declaration is not allowed under Script mode.
We should take an argument indicating the mode.
Comment 3 Carlos Garcia Campos 2018-07-18 05:40:26 PDT
Created attachment 345238 [details]
Updated patch
Comment 4 Yusuke Suzuki 2018-07-18 05:48:24 PDT
Comment on attachment 345238 [details]
Updated patch

r=me
Comment 5 Carlos Garcia Campos 2018-07-18 05:54:56 PDT
Committed r233911: <https://trac.webkit.org/changeset/233911>
Comment 6 Radar WebKit Bug Importer 2018-07-18 05:55:21 PDT
<rdar://problem/42331406>