@@ -92,6 +92,10 @@ struct JsAPIHooks
9292
9393 typedef JsErrorCode (WINAPI *JsrtSerializeParserState)(JsValueRef script, JsValueRef *buffer, JsParseScriptAttributes parseAttributes);
9494 typedef JsErrorCode (WINAPI *JsrtRunScriptWithParserState)(JsValueRef script, JsSourceContext sourceContext, JsValueRef sourceUrl, JsParseScriptAttributes parseAttributes, JsValueRef parserState, JsValueRef *result);
95+
96+ typedef JsErrorCode (WINAPI *JsrtQueueBackgroundParse)(JsScriptContents* contents, DWORD* dwBgParseCookie);
97+ typedef JsErrorCode (WINAPI *JsrtDiscardBackgroundParse)(DWORD dwBgParseCookie, void * buffer, bool * callerOwnsBuffer);
98+ typedef JsErrorCode (WINAPI *JsrtExecuteBackgroundParse)(DWORD dwBgParseCookie, JsValueRef script, JsSourceContext sourceContext, WCHAR *url, JsParseScriptAttributes parseAttributes, JsValueRef parserState, JsValueRef *result);
9599
96100 typedef JsErrorCode (WINAPI *JsrtTTDCreateRecordRuntimePtr)(JsRuntimeAttributes attributes, bool enableDebugging, size_t snapInterval, size_t snapHistoryLength, TTDOpenResourceStreamCallback openResourceStream, JsTTDWriteBytesToStreamCallback writeBytesToStream, JsTTDFlushAndCloseStreamCallback flushAndCloseStream, JsThreadServiceCallback threadService, JsRuntimeHandle *runtime);
97101 typedef JsErrorCode (WINAPI *JsrtTTDCreateReplayRuntimePtr)(JsRuntimeAttributes attributes, const char * infoUri, size_t infoUriCount, bool enableDebugging, TTDOpenResourceStreamCallback openResourceStream, JsTTDReadBytesFromStreamCallback readBytesFromStream, JsTTDFlushAndCloseStreamCallback flushAndCloseStream, JsThreadServiceCallback threadService, JsRuntimeHandle *runtime);
@@ -195,6 +199,10 @@ struct JsAPIHooks
195199 JsrtSerializeParserState pfJsrtSerializeParserState;
196200 JsrtRunScriptWithParserState pfJsrtRunScriptWithParserState;
197201
202+ JsrtQueueBackgroundParse pfJsrtQueueBackgroundParse;
203+ JsrtDiscardBackgroundParse pfJsrtDiscardBackgroundParse;
204+ JsrtExecuteBackgroundParse pfJsrtExecuteBackgroundParse;
205+
198206 JsrtTTDCreateRecordRuntimePtr pfJsrtTTDCreateRecordRuntime;
199207 JsrtTTDCreateReplayRuntimePtr pfJsrtTTDCreateReplayRuntime;
200208 JsrtTTDCreateContextPtr pfJsrtTTDCreateContext;
@@ -430,6 +438,10 @@ class ChakraRTInterface
430438
431439 static JsErrorCode WINAPI JsSerializeParserState (JsValueRef script, JsValueRef *buffer, JsParseScriptAttributes parseAttributes) { return HOOK_JS_API (SerializeParserState (script, buffer, parseAttributes)); }
432440 static JsErrorCode WINAPI JsRunScriptWithParserState (JsValueRef script, JsSourceContext sourceContext, JsValueRef sourceUrl, JsParseScriptAttributes parseAttributes, JsValueRef parserState, JsValueRef * result) { return HOOK_JS_API (RunScriptWithParserState (script, sourceContext, sourceUrl, parseAttributes, parserState, result)); }
441+
442+ static JsErrorCode WINAPI JsQueueBackgroundParse (JsScriptContents* contents, DWORD* dwBgParseCookie) { return HOOK_JS_API (QueueBackgroundParse (contents, dwBgParseCookie)); }
443+ static JsErrorCode WINAPI JsDiscardBackgroundParse (DWORD dwBgParseCookie, void * buffer, bool * callerOwnsBuffer) { return HOOK_JS_API (DiscardBackgroundParse (dwBgParseCookie, buffer, callerOwnsBuffer)); }
444+ static JsErrorCode WINAPI JsExecuteBackgroundParse (DWORD dwBgParseCookie, JsValueRef script, JsSourceContext sourceContext, WCHAR *url, JsParseScriptAttributes parseAttributes, JsValueRef parserState, JsValueRef *result) { return HOOK_JS_API (ExecuteBackgroundParse (dwBgParseCookie, script, sourceContext, url, parseAttributes, parserState, result)); }
433445};
434446
435447class AutoRestoreContext
0 commit comments