winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2009
----- 2025 -----
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
866 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Avoid crashing on an empty resource directory.
by Alexandre Julliard
24 Sep '09
24 Sep '09
Module: wine Branch: master Commit: 5b0fcb065e6c5d148ffefecbf162b8c4c285ee7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5b0fcb065e6c5d148ffefecbf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 24 13:14:47 2009 +0200 ntdll: Avoid crashing on an empty resource directory. --- dlls/ntdll/resource.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c index b9d2a6b..ff0a5d0 100644 --- a/dlls/ntdll/resource.c +++ b/dlls/ntdll/resource.c @@ -186,6 +186,7 @@ static NTSTATUS find_entry( HMODULE hmod, const LDR_RESOURCE_INFO *info, root = RtlImageDirectoryEntryToData( hmod, TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &size ); if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND; + if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND; resdirptr = root; if (!level--) goto done;
1
0
0
0
Alexandre Julliard : kernel32/tests: Fix a couple of failures in the comm tests.
by Alexandre Julliard
24 Sep '09
24 Sep '09
Module: wine Branch: master Commit: b9251bcdbffdea95db8e5d7af16cee258ad32568 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9251bcdbffdea95db8e5d7af…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 24 13:10:54 2009 +0200 kernel32/tests: Fix a couple of failures in the comm tests. --- dlls/kernel32/tests/comm.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index 3d0d17b..8cb010c 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -684,7 +684,7 @@ static HANDLE test_OpenComm(BOOL doOverlap) if (hcom == INVALID_HANDLE_VALUE) trace("Could not find a valid COM port. Skipping test_ReadTimeOut\n"); else - trace("Found Com port %s. Connected devices may disturbe results\n", port_name); + trace("Found Com port %s. Connected devices may disturb results\n", port_name); /*shown = TRUE; */ } if (hcom != INVALID_HANDLE_VALUE) @@ -692,9 +692,12 @@ static HANDLE test_OpenComm(BOOL doOverlap) BOOL ret; ret = ClearCommError(hcom, &errors, &comstat); - if (!ret && GetLastError() == ERROR_NOT_READY) + if (!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_HANDLE)) { - trace("%s doesn't respond, skipping the test\n", port_name); + if (GetLastError() == ERROR_NOT_READY) + trace("%s doesn't respond, skipping the test\n", port_name); + else + trace("%s is not a real serial port, skipping the test\n", port_name); CloseHandle(hcom); return INVALID_HANDLE_VALUE; } @@ -1649,7 +1652,8 @@ static void test_stdio(void) /* cygwin tries this to determine the stdin handle type */ ok( !GetCommState( GetStdHandle(STD_INPUT_HANDLE), &dcb ), "GetCommState succeeded on stdin\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_FUNCTION, + "got error %u\n", GetLastError() ); } START_TEST(comm)
1
0
0
0
Alexandre Julliard : kernel32: Cope with an empty resource section in UpdateResource.
by Alexandre Julliard
24 Sep '09
24 Sep '09
Module: wine Branch: master Commit: 9f28d9a171c34552ba9040d5b499190af4225af8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f28d9a171c34552ba9040d5b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 24 13:10:39 2009 +0200 kernel32: Cope with an empty resource section in UpdateResource. --- dlls/kernel32/resource.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c index f49ea24..9feb672 100644 --- a/dlls/kernel32/resource.c +++ b/dlls/kernel32/resource.c @@ -1078,6 +1078,9 @@ static BOOL read_mapped_resources( QUEUEDUPDATES *updates, void *base, DWORD map TRACE("found .rsrc at %08x, size %08x\n", sec[i].PointerToRawData, sec[i].SizeOfRawData); + if (!sec[i].PointerToRawData || sec[i].SizeOfRawData < sizeof(IMAGE_RESOURCE_DIRECTORY)) + return TRUE; + root = (void*) ((BYTE*)base + sec[i].PointerToRawData); enumerate_mapped_resources( updates, base, mapping_size, root ); @@ -1404,13 +1407,6 @@ static IMAGE_SECTION_HEADER *get_resource_section( void *base, DWORD mapping_siz return NULL; } - /* check that the resources section is last */ - if (i != num_sections - 1) - { - FIXME(".rsrc isn't the last section\n"); - return NULL; - } - return &sec[i]; } @@ -1487,10 +1483,15 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates ) if (!sec) goto done; - if ((sec->SizeOfRawData + sec->PointerToRawData) != write_map->size) + if (!sec->PointerToRawData) /* empty section */ + { + sec->PointerToRawData = write_map->size; + sec->SizeOfRawData = 0; + } + else if ((sec->SizeOfRawData + sec->PointerToRawData) != write_map->size) { - FIXME(".rsrc isn't at the end of the image %08x + %08x != %08x\n", - sec->SizeOfRawData, sec->PointerToRawData, write_map->size); + FIXME(".rsrc isn't at the end of the image %08x + %08x != %08x for %s\n", + sec->SizeOfRawData, sec->PointerToRawData, write_map->size, debugstr_w(updates->pFileName)); goto done; }
1
0
0
0
Jacek Caban : jscript: Throw correct error in get_length.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: bb4050d79280dc83e4f3159eb121cb88d84721e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb4050d79280dc83e4f3159eb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:24:11 2009 +0200 jscript: Throw correct error in get_length. --- dlls/jscript/array.c | 6 ++---- dlls/jscript/jscript_En.rc | 1 + dlls/jscript/resource.h | 1 + dlls/jscript/tests/api.js | 10 ++++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c index b3dc780..1fa20fe 100644 --- a/dlls/jscript/array.c +++ b/dlls/jscript/array.c @@ -69,10 +69,8 @@ static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, Dis return S_OK; } - if(!is_jsdisp(vdisp)) { - FIXME("Not JScript object\n"); - return E_FAIL; - } + if(!is_jsdisp(vdisp)) + return throw_type_error(ctx, ei, IDS_JSCRIPT_EXPECTED, NULL); hres = jsdisp_propget_name(vdisp->u.jsdisp, lengthW, &var, ei, NULL/*FIXME*/); if(FAILED(hres)) diff --git a/dlls/jscript/jscript_En.rc b/dlls/jscript/jscript_En.rc index b7f8744..79921b4 100644 --- a/dlls/jscript/jscript_En.rc +++ b/dlls/jscript/jscript_En.rc @@ -38,6 +38,7 @@ STRINGTABLE DISCARDABLE IDS_ILLEGAL_ASSIGN "Illegal assignment" IDS_UNDEFINED "'|' is undefined" IDS_NOT_BOOL "Boolean object expected" + IDS_JSCRIPT_EXPECTED "JScript object expected" IDS_REGEXP_SYNTAX_ERROR "Syntax error in regular expression" IDS_INVALID_LENGTH "Array length must be a finite positive integer" } diff --git a/dlls/jscript/resource.h b/dlls/jscript/resource.h index 9e33ebc..81cd74d 100644 --- a/dlls/jscript/resource.h +++ b/dlls/jscript/resource.h @@ -34,5 +34,6 @@ #define IDS_ILLEGAL_ASSIGN 0x1390 #define IDS_UNDEFINED 0x1391 #define IDS_NOT_BOOL 0x1392 +#define IDS_JSCRIPT_EXPECTED 0x1396 #define IDS_REGEXP_SYNTAX_ERROR 0x1399 #define IDS_INVALID_LENGTH 0x13A5 diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index ee3a058..1c2f56b 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1621,6 +1621,16 @@ exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273); exception_test(function() {eval("nonexistingfunc()")}, "TypeError", -2146823281); exception_test(function() {RegExp(/a/, "g");}, "RegExpError", -2146823271); +function testArrayHostThis(func) { + exception_test(function() { Array.prototype[func].call(testObj); }, "TypeError", -2146823274); +} + +testArrayHostThis("push"); +testArrayHostThis("shift"); +testArrayHostThis("slice"); +testArrayHostThis("splice"); +testArrayHostThis("unshift"); + function testObjectInherit(obj, constr, ts, tls, vo) { ok(obj instanceof Object, "obj is not instance of Object"); ok(obj instanceof constr, "obj is not instance of its constructor");
1
0
0
0
Jacek Caban : jscript: Allow 'this' to be host object in invoke_value_proc.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 8717c388f89dfc46d968d1a9375332cc69351358 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8717c388f89dfc46d968d1a93…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:20:27 2009 +0200 jscript: Allow 'this' to be host object in invoke_value_proc. --- dlls/jscript/function.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 74c4e47..88bf9c3 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -257,21 +257,19 @@ static HRESULT invoke_constructor(script_ctx_t *ctx, FunctionInstance *function, static HRESULT invoke_value_proc(script_ctx_t *ctx, FunctionInstance *function, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - DispatchEx *this_obj = NULL; IDispatch *this_disp; vdisp_t vthis; HRESULT hres; this_disp = get_this(dp); if(this_disp) - this_obj = iface_to_jsdisp((IUnknown*)this_disp); + set_disp(&vthis, this_disp); + else + set_jsdisp(&vthis, ctx->script_disp); - set_jsdisp(&vthis, this_obj ? this_obj : ctx->script_disp); hres = function->value_proc(ctx, &vthis, flags, dp, retv, ei, caller); - vdisp_release(&vthis); - if(this_obj) - jsdisp_release(this_obj); + vdisp_release(&vthis); return hres; }
1
0
0
0
Jacek Caban : jscript: Added Object. toString for host objects implementation.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 461180459b7a077fbdd617b51b3d0641863e5921 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=461180459b7a077fbdd617b51…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:19:58 2009 +0200 jscript: Added Object.toString for host objects implementation. --- dlls/jscript/object.c | 11 ++++++++--- dlls/jscript/tests/api.js | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 7dffff7..f5bc455 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -36,6 +36,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { DispatchEx *jsdisp; + const WCHAR *str; static const WCHAR formatW[] = {'[','o','b','j','e','c','t',' ','%','s',']',0}; @@ -56,18 +57,22 @@ static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D TRACE("\n"); jsdisp = get_jsdisp(jsthis); - if(!jsdisp || names[jsdisp->builtin_info->class] == NULL) { + if(!jsdisp) { + str = objectW; + }else if(names[jsdisp->builtin_info->class]) { + str = names[jsdisp->builtin_info->class]; + }else { FIXME("jdisp->builtin_info->class = %d\n", jsdisp->builtin_info->class); return E_FAIL; } if(retv) { V_VT(retv) = VT_BSTR; - V_BSTR(retv) = SysAllocStringLen(NULL, 9+strlenW(names[jsdisp->builtin_info->class])); + V_BSTR(retv) = SysAllocStringLen(NULL, 9+strlenW(str)); if(!V_BSTR(retv)) return E_OUTOFMEMORY; - sprintfW(V_BSTR(retv), formatW, names[jsdisp->builtin_info->class]); + sprintfW(V_BSTR(retv), formatW, str); } return S_OK; diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 7b22212..ee3a058 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -87,6 +87,8 @@ ok(tmp.f() === "[object Number]", "tmp.f() = " + tmp.f()); ok(tmp.f() === "[object RegExp]", "tmp.f() = " + tmp.f()); (tmp = new String).f = Object.prototype.toString; ok(tmp.f() === "[object String]", "tmp.f() = " + tmp.f()); +tmp = Object.prototype.toString.call(testObj); +ok(tmp === "[object Object]", "'' + new Object() = " + tmp); ok(Object(1) instanceof Number, "Object(1) is not instance of Number"); ok(Object("") instanceof String, "Object('') is not instance of String");
1
0
0
0
Jacek Caban : jscript: Allow this_obj to be host object in call_function.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 37c2d43e28ec5f3188dbdf2c0866dbf1b41315b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37c2d43e28ec5f3188dbdf2c0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:19:29 2009 +0200 jscript: Allow this_obj to be host object in call_function. --- dlls/jscript/function.c | 14 ++++---------- dlls/jscript/tests/run.c | 4 ++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index e68222b..74c4e47 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -281,21 +281,15 @@ static HRESULT call_function(script_ctx_t *ctx, FunctionInstance *function, IDis HRESULT hres; if(function->value_proc) { - DispatchEx *jsthis = NULL; vdisp_t vthis; - if(this_obj) { - jsthis = iface_to_jsdisp((IUnknown*)this_obj); - if(!jsthis) - FIXME("this_obj is not DispatchEx\n"); - } + if(this_obj) + set_disp(&vthis, this_obj); + else + set_jsdisp(&vthis, ctx->script_disp); - set_jsdisp(&vthis, jsthis ? jsthis : ctx->script_disp); hres = function->value_proc(ctx, &vthis, DISPATCH_METHOD, args, retv, ei, caller); vdisp_release(&vthis); - - if(jsthis) - jsdisp_release(jsthis); }else { hres = invoke_source(ctx, function, this_obj ? this_obj : (IDispatch*)_IDispatchEx_(ctx->script_disp), args, retv, ei, caller); diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 786624c..1cfee4f 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -912,6 +912,10 @@ static void run_tests(void) parse_script_a("ok(String(testObj) === '1', 'wrong testObj value');"); CHECK_CALLED(testobj_value); + SET_EXPECT(testobj_value); + parse_script_a("ok(String.prototype.concat.call(testObj, ' OK') === '1 OK', 'wrong concat result');"); + CHECK_CALLED(testobj_value); + run_from_res("lang.js"); run_from_res("api.js"); run_from_res("regexp.js");
1
0
0
0
Jacek Caban : jscript: Allow 'this' to be host object in builtin functions.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: f8c2b42de44eafe53f2f39afbe9d8289310b10e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8c2b42de44eafe53f2f39afb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:18:39 2009 +0200 jscript: Allow 'this' to be host object in builtin functions. --- dlls/jscript/array.c | 248 +++++++++++++------------ dlls/jscript/bool.c | 24 ++- dlls/jscript/date.c | 311 +++++++++++++++---------------- dlls/jscript/dispex.c | 37 +++- dlls/jscript/error.c | 37 ++-- dlls/jscript/function.c | 55 +++--- dlls/jscript/global.c | 68 ++++---- dlls/jscript/jscript.h | 78 ++++++++- dlls/jscript/math.c | 52 +++--- dlls/jscript/number.c | 41 +++-- dlls/jscript/object.c | 39 +++-- dlls/jscript/regexp.c | 39 +++-- dlls/jscript/string.c | 480 +++++++++++++++-------------------------------- 13 files changed, 736 insertions(+), 773 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f8c2b42de44eafe53f2f3…
1
0
0
0
Jacek Caban : jscript: Avoid using dispex->ctx.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 5dcd182e8f9052e719c58372caba76ac57e4e4d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5dcd182e8f9052e719c58372c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:17:17 2009 +0200 jscript: Avoid using dispex->ctx. --- dlls/jscript/bool.c | 8 ++-- dlls/jscript/engine.c | 4 +- dlls/jscript/error.c | 38 ++++++--------- dlls/jscript/global.c | 52 ++++++++++---------- dlls/jscript/jscript.h | 4 +- dlls/jscript/math.c | 42 ++++++++-------- dlls/jscript/number.c | 18 +++--- dlls/jscript/object.c | 6 +- dlls/jscript/regexp.c | 36 +++++++------- dlls/jscript/string.c | 130 ++++++++++++++++++++++++------------------------ 10 files changed, 165 insertions(+), 173 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5dcd182e8f9052e719c58…
1
0
0
0
Jacek Caban : jscript: Don't use dispex->ctx in function.c.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: a9dc89a3e1647f41aff3bc64637e2fd66822baa9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9dc89a3e1647f41aff3bc646…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:16:43 2009 +0200 jscript: Don't use dispex->ctx in function.c. --- dlls/jscript/function.c | 57 +++++++++++++++++++++++------------------------ 1 files changed, 28 insertions(+), 29 deletions(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 7d4be89..bd7c99b 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -147,7 +147,7 @@ static HRESULT create_arguments(script_ctx_t *ctx, IDispatch *calee, DISPPARAMS return S_OK; } -static HRESULT create_var_disp(FunctionInstance *function, DISPPARAMS *dp, jsexcept_t *ei, +static HRESULT create_var_disp(script_ctx_t *ctx, FunctionInstance *function, DISPPARAMS *dp, jsexcept_t *ei, IServiceProvider *caller, DispatchEx **ret) { DispatchEx *var_disp, *arg_disp; @@ -155,11 +155,11 @@ static HRESULT create_var_disp(FunctionInstance *function, DISPPARAMS *dp, jsexc static const WCHAR argumentsW[] = {'a','r','g','u','m','e','n','t','s',0}; - hres = create_dispex(function->dispex.ctx, NULL, NULL, &var_disp); + hres = create_dispex(ctx, NULL, NULL, &var_disp); if(FAILED(hres)) return hres; - hres = create_arguments(function->dispex.ctx, (IDispatch*)_IDispatchEx_(&function->dispex), + hres = create_arguments(ctx, (IDispatch*)_IDispatchEx_(&function->dispex), dp, ei, caller, &arg_disp); if(SUCCEEDED(hres)) { VARIANT var; @@ -181,7 +181,7 @@ static HRESULT create_var_disp(FunctionInstance *function, DISPPARAMS *dp, jsexc return S_OK; } -static HRESULT invoke_source(FunctionInstance *function, IDispatch *this_obj, DISPPARAMS *dp, +static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDispatch *this_obj, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { DispatchEx *var_disp; @@ -194,7 +194,7 @@ static HRESULT invoke_source(FunctionInstance *function, IDispatch *this_obj, DI return E_FAIL; } - hres = create_var_disp(function, dp, ei, caller, &var_disp); + hres = create_var_disp(ctx, function, dp, ei, caller, &var_disp); if(FAILED(hres)) return hres; @@ -212,28 +212,28 @@ static HRESULT invoke_source(FunctionInstance *function, IDispatch *this_obj, DI return hres; } -static HRESULT invoke_function(FunctionInstance *function, DISPPARAMS *dp, +static HRESULT invoke_function(script_ctx_t *ctx, FunctionInstance *function, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { IDispatch *this_obj; if(!(this_obj = get_this(dp))) - this_obj = (IDispatch*)_IDispatchEx_(function->dispex.ctx->script_disp); + this_obj = (IDispatch*)_IDispatchEx_(ctx->script_disp); - return invoke_source(function, this_obj, dp, retv, ei, caller); + return invoke_source(ctx, function, this_obj, dp, retv, ei, caller); } -static HRESULT invoke_constructor(FunctionInstance *function, DISPPARAMS *dp, +static HRESULT invoke_constructor(script_ctx_t *ctx, FunctionInstance *function, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { DispatchEx *this_obj; HRESULT hres; - hres = create_object(function->dispex.ctx, &function->dispex, &this_obj); + hres = create_object(ctx, &function->dispex, &this_obj); if(FAILED(hres)) return hres; - hres = invoke_source(function, (IDispatch*)_IDispatchEx_(this_obj), dp, retv, ei, caller); + hres = invoke_source(ctx, function, (IDispatch*)_IDispatchEx_(this_obj), dp, retv, ei, caller); if(FAILED(hres)) { jsdisp_release(this_obj); return hres; @@ -244,7 +244,7 @@ static HRESULT invoke_constructor(FunctionInstance *function, DISPPARAMS *dp, return S_OK; } -static HRESULT invoke_value_proc(FunctionInstance *function, WORD flags, DISPPARAMS *dp, +static HRESULT invoke_value_proc(script_ctx_t *ctx, FunctionInstance *function, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { DispatchEx *this_obj = NULL; @@ -255,7 +255,7 @@ static HRESULT invoke_value_proc(FunctionInstance *function, WORD flags, DISPPAR if(this_disp) this_obj = iface_to_jsdisp((IUnknown*)this_disp); - hres = function->value_proc(function->dispex.ctx, this_obj ? this_obj : function->dispex.ctx->script_disp, + hres = function->value_proc(ctx, this_obj ? this_obj : ctx->script_disp, flags, dp, retv, ei, caller); if(this_obj) @@ -263,7 +263,7 @@ static HRESULT invoke_value_proc(FunctionInstance *function, WORD flags, DISPPAR return hres; } -static HRESULT call_function(FunctionInstance *function, IDispatch *this_obj, DISPPARAMS *args, +static HRESULT call_function(script_ctx_t *ctx, FunctionInstance *function, IDispatch *this_obj, DISPPARAMS *args, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { HRESULT hres; @@ -277,14 +277,13 @@ static HRESULT call_function(FunctionInstance *function, IDispatch *this_obj, DI FIXME("this_obj is not DispatchEx\n"); } - hres = function->value_proc(function->dispex.ctx, jsthis ? jsthis : function->dispex.ctx->script_disp, + hres = function->value_proc(ctx, jsthis ? jsthis : ctx->script_disp, DISPATCH_METHOD, args, retv, ei, caller); if(jsthis) jsdisp_release(jsthis); }else { - hres = invoke_source(function, - this_obj ? this_obj : (IDispatch*)_IDispatchEx_(function->dispex.ctx->script_disp), + hres = invoke_source(ctx, function, this_obj ? this_obj : (IDispatch*)_IDispatchEx_(ctx->script_disp), args, retv, ei, caller); } @@ -350,7 +349,7 @@ static HRESULT Function_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD fla TRACE("\n"); if(!is_class(dispex, JSCLASS_FUNCTION)) - return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); + return throw_type_error(ctx, ei, IDS_NOT_FUNC, NULL); function = (FunctionInstance*)dispex; @@ -367,7 +366,7 @@ static HRESULT Function_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD fla return S_OK; } -static HRESULT array_to_args(DispatchEx *arg_array, jsexcept_t *ei, IServiceProvider *caller, +static HRESULT array_to_args(script_ctx_t *ctx, DispatchEx *arg_array, jsexcept_t *ei, IServiceProvider *caller, DISPPARAMS *args) { VARIANT var, *argv; @@ -378,7 +377,7 @@ static HRESULT array_to_args(DispatchEx *arg_array, jsexcept_t *ei, IServiceProv if(FAILED(hres)) return hres; - hres = to_uint32(arg_array->ctx, &var, ei, &length); + hres = to_uint32(ctx, &var, ei, &length); VariantClear(&var); if(FAILED(hres)) return hres; @@ -422,7 +421,7 @@ static HRESULT Function_apply(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, argc = arg_cnt(dp); if(argc) { - hres = to_object(dispex->ctx, get_arg(dp,0), &this_obj); + hres = to_object(ctx, get_arg(dp,0), &this_obj); if(FAILED(hres)) return hres; } @@ -440,7 +439,7 @@ static HRESULT Function_apply(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, } if(arg_array) { - hres = array_to_args(arg_array, ei, caller, &args); + hres = array_to_args(ctx, arg_array, ei, caller, &args); jsdisp_release(arg_array); }else { FIXME("throw TypeError\n"); @@ -448,7 +447,7 @@ static HRESULT Function_apply(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, } } - hres = call_function(function, this_obj, &args, retv, ei, caller); + hres = call_function(ctx, function, this_obj, &args, retv, ei, caller); if(this_obj) IDispatch_Release(this_obj); @@ -478,7 +477,7 @@ static HRESULT Function_call(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, argc = arg_cnt(dp); if(argc) { - hres = to_object(dispex->ctx, get_arg(dp,0), &this_obj); + hres = to_object(ctx, get_arg(dp,0), &this_obj); if(FAILED(hres)) return hres; args.cArgs = argc-1; @@ -487,7 +486,7 @@ static HRESULT Function_call(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, if(args.cArgs) args.rgvarg = dp->rgvarg + dp->cArgs - args.cArgs-1; - hres = call_function(function, this_obj, &args, retv, ei, caller); + hres = call_function(ctx, function, this_obj, &args, retv, ei, caller); if(this_obj) IDispatch_Release(this_obj); @@ -511,9 +510,9 @@ HRESULT Function_value(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, DISPPA switch(flags) { case DISPATCH_METHOD: if(function->value_proc) - return invoke_value_proc(function, flags, dp, retv, ei, caller); + return invoke_value_proc(ctx, function, flags, dp, retv, ei, caller); - return invoke_function(function, dp, retv, ei, caller); + return invoke_function(ctx, function, dp, retv, ei, caller); case DISPATCH_PROPERTYGET: { HRESULT hres; @@ -530,9 +529,9 @@ HRESULT Function_value(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, DISPPA case DISPATCH_CONSTRUCT: if(function->value_proc) - return invoke_value_proc(function, flags, dp, retv, ei, caller); + return invoke_value_proc(ctx, function, flags, dp, retv, ei, caller); - return invoke_constructor(function, dp, retv, ei, caller); + return invoke_constructor(ctx, function, dp, retv, ei, caller); default: FIXME("not implemented flags %x\n", flags);
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200