mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:13:23 +00:00
[JSCRIPT] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
919215fd3b
commit
8dba275bd6
38 changed files with 859 additions and 453 deletions
|
@ -16,7 +16,15 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "jscript.h"
|
||||
#include "engine.h"
|
||||
#include "objsafe.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
|
@ -47,6 +55,7 @@ typedef struct {
|
|||
LONG thread_id;
|
||||
LCID lcid;
|
||||
DWORD version;
|
||||
BOOL html_mode;
|
||||
BOOL is_encode;
|
||||
|
||||
IActiveScriptSite *site;
|
||||
|
@ -704,6 +713,7 @@ static HRESULT WINAPI JScriptParse_InitNew(IActiveScriptParse *iface)
|
|||
ctx->active_script = &This->IActiveScript_iface;
|
||||
ctx->safeopt = This->safeopt;
|
||||
ctx->version = This->version;
|
||||
ctx->html_mode = This->html_mode;
|
||||
ctx->ei.val = jsval_undefined();
|
||||
heap_pool_init(&ctx->tmp_heap);
|
||||
|
||||
|
@ -912,12 +922,14 @@ static HRESULT WINAPI JScriptProperty_SetProperty(IActiveScriptProperty *iface,
|
|||
|
||||
switch(dwProperty) {
|
||||
case SCRIPTPROP_INVOKEVERSIONING:
|
||||
if(V_VT(pvarValue) != VT_I4 || V_I4(pvarValue) < 0 || V_I4(pvarValue) > 15) {
|
||||
if(V_VT(pvarValue) != VT_I4 || V_I4(pvarValue) < 0
|
||||
|| (V_I4(pvarValue) > 15 && !(V_I4(pvarValue) & SCRIPTLANGUAGEVERSION_HTML))) {
|
||||
WARN("invalid value %s\n", debugstr_variant(pvarValue));
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
This->version = V_I4(pvarValue);
|
||||
This->version = V_I4(pvarValue) & 0x1ff;
|
||||
This->html_mode = (V_I4(pvarValue) & SCRIPTLANGUAGEVERSION_HTML) != 0;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unimplemented property %x\n", dwProperty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue