{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/3602","repository_url":"https://api.github.com/repos/Microsoft/ChakraCore","labels_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/3602/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/3602/comments","events_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/3602/events","html_url":"https://github.com/Microsoft/ChakraCore/issues/3602","id":253540447,"number":3602,"title":"JsParseModuleSource() gives weird syntax errors","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars2.githubusercontent.com/u/4097841?v=4","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[{"id":507522376,"url":"https://api.github.com/repos/Microsoft/ChakraCore/labels/APIs","name":"APIs","color":"009075","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-29T06:18:22Z","updated_at":"2017-08-29T21:53:06Z","closed_at":null,"author_association":"NONE","body":"I'm getting spurious syntax errors for completely legal code which prevents me from testing ES6 modules.  I even get a syntax error for a zero-length script(!)\r\n\r\nAm I doing something wrong?  My module evaluation function looks like this:\r\n```c\r\nvoid\r\njsal_eval_module(const char* filename)\r\n{\r\n\t/* [ ... source ] -> [ .. exports ] */\r\n\r\n\tJsErrorCode    error_code;\r\n\tJsValueRef     exception;\r\n\tJsModuleRecord module;\r\n\tJsValueRef     result;\r\n\tJsValueRef     source;\r\n\tsize_t         source_len;\r\n\tconst wchar_t* source_ptr;\r\n\tJsValueRef     url_string;\r\n\r\n\tsource = pop_value();\r\n\tJsStringToPointer(source, &source_ptr, &source_len);\r\n\tJsCreateString(filename, strlen(filename), &url_string);\r\n\tJsInitializeModuleRecord(NULL, url_string, &module);\r\n\terror_code = JsParseModuleSource(module, JS_SOURCE_CONTEXT_NONE, (BYTE*)source_ptr, (unsigned int)source_len,\r\n\t\tJsParseModuleSourceFlags_DataIsUTF16LE, &exception);\r\n\tif (error_code = JsErrorScriptCompile)\r\n\t\tthrow_value(exception);\r\n\tJsModuleEvaluation(module, &result);\r\n\tthrow_if_error();\r\n\r\n\tpush_value(result);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/comments/325815503","html_url":"https://github.com/Microsoft/ChakraCore/issues/3602#issuecomment-325815503","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/3602","id":325815503,"user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars2.githubusercontent.com/u/4097841?v=4","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"created_at":"2017-08-29T21:53:06Z","updated_at":"2017-08-29T21:53:06Z","author_association":"NONE","body":"I tried adding the fetch and notify callbacks and it successfully loaded all the modules but then the top-level module parse crashed with a null pointer access (childModule was NULL I think it was).  What else am I missing?"}}
{"actor":{"display_login":"fatcerberus"}}