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
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
November 2021
----- 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
2 participants
951 discussions
Start a n
N
ew thread
Rémi Bernon : dinput: Stub IDirectInputDevice8_GetForceFeedbackState implementation.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 5abf6efcd96bd2edfce6b69b099c86f525b606cc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5abf6efcd96bd2edfce6b69b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Nov 24 16:09:41 2021 +0100 dinput: Stub IDirectInputDevice8_GetForceFeedbackState implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 12 ++++++++++-- dlls/dinput8/tests/hid.c | 10 ---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 02a71e6923c..19fbe724b56 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1762,9 +1762,17 @@ static HRESULT WINAPI dinput_device_GetEffectInfo( IDirectInputDevice8W *iface, static HRESULT WINAPI dinput_device_GetForceFeedbackState( IDirectInputDevice8W *iface, DWORD *out ) { - FIXME( "iface %p, out %p stub!\n", iface, out ); + struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface ); + + FIXME( "iface %p, out %p semi-stub!\n", iface, out ); + if (!out) return E_POINTER; - return DIERR_UNSUPPORTED; + *out = 0; + + if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED; + if (!impl->acquired || !(impl->dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED; + + return DI_OK; } static HRESULT WINAPI dinput_device_SendForceFeedbackCommand( IDirectInputDevice8W *iface, DWORD command ) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index bcff4b59846..bda738bc178 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -8062,7 +8062,6 @@ static void test_force_feedback_joystick( DWORD version ) hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetForceFeedbackState returned %#x\n", hr ); hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET ); ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "SendForceFeedbackCommand returned %#x\n", hr ); @@ -8819,7 +8818,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetForceFeedbackState returned %#x\n", hr ); hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET ); ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "SendForceFeedbackCommand returned %#x\n", hr ); @@ -8839,7 +8837,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_STOPPED|DIGFFS_EMPTY; todo_wine @@ -8863,7 +8860,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_EMPTY|DIGFFS_ACTUATORSON|DIGFFS_POWERON|DIGFFS_SAFETYSWITCHON|DIGFFS_USERFFSWITCHON; todo_wine @@ -8910,7 +8906,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_STOPPED|DIGFFS_EMPTY; todo_wine @@ -8931,7 +8926,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_STOPPED; todo_wine @@ -8969,7 +8963,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_ACTUATORSOFF|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; todo_wine @@ -8988,7 +8981,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; todo_wine @@ -9009,7 +9001,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; todo_wine @@ -9030,7 +9021,6 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); - todo_wine ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_EMPTY|DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; todo_wine
1
0
0
0
Rémi Bernon : dinput: Stub support for DIPROP_FFLOAD device property.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 3b2f7433dbd8d69e03fa673533b5d375024cc9ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b2f7433dbd8d69e03fa6735…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Nov 24 16:09:40 2021 +0100 dinput: Stub support for DIPROP_FFLOAD device property. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 5 +++++ dlls/dinput/joystick_hid.c | 8 ++++++++ dlls/dinput8/tests/hid.c | 9 --------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 6240d640e0d..02a71e6923c 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1056,6 +1056,10 @@ static HRESULT check_property( struct dinput_device *impl, const GUID *guid, con if (!impl->object_properties) return DIERR_UNSUPPORTED; break; + case (DWORD_PTR)DIPROP_FFLOAD: + if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED; + if (!impl->acquired || !(impl->dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED; + /* fallthrough */ case (DWORD_PTR)DIPROP_PRODUCTNAME: case (DWORD_PTR)DIPROP_INSTANCENAME: case (DWORD_PTR)DIPROP_VIDPID: @@ -1173,6 +1177,7 @@ static HRESULT dinput_device_get_property( IDirectInputDevice8W *iface, const GU case (DWORD_PTR)DIPROP_VIDPID: case (DWORD_PTR)DIPROP_JOYSTICKID: case (DWORD_PTR)DIPROP_GUIDANDPATH: + case (DWORD_PTR)DIPROP_FFLOAD: return impl->vtbl->get_property( iface, LOWORD( guid ), header, NULL ); case (DWORD_PTR)DIPROP_RANGE: diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 99436bd8b05..971e775867f 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -824,6 +824,14 @@ static HRESULT hid_joystick_get_property( IDirectInputDevice8W *iface, DWORD pro lstrcpynW( value->wszPath, impl->device_path, MAX_PATH ); return DI_OK; } + case (DWORD_PTR)DIPROP_FFLOAD: + { + DIPROPDWORD *value = (DIPROPDWORD *)header; + if (!(impl->base.caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED; + if (!impl->base.acquired || !(impl->base.dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED; + value->dwData = 0; + return DI_OK; + } } return DIERR_UNSUPPORTED; diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index f3d35e57ce1..bcff4b59846 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -7990,7 +7990,6 @@ static void test_force_feedback_joystick( DWORD version ) ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 ); hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_EnumObjects( device, check_objects, &check_objects_params, DIDFT_ALL ); @@ -8061,7 +8060,6 @@ static void test_force_feedback_joystick( DWORD version ) hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); ok( hr == DIERR_READONLY, "SetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); todo_wine @@ -8819,7 +8817,6 @@ static void test_device_managed_effect(void) ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr ); hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); todo_wine @@ -8835,9 +8832,7 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); prop_dword.dwData = 0xdeadbeef; hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); - todo_wine ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData ); set_hid_expect( file, NULL, 0 ); @@ -8854,9 +8849,7 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); prop_dword.dwData = 0xdeadbeef; hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); - todo_wine ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData ); set_hid_expect( file, NULL, 0 ); @@ -8948,9 +8941,7 @@ static void test_device_managed_effect(void) set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); prop_dword.dwData = 0xdeadbeef; hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); - todo_wine ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr ); - todo_wine ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData ); set_hid_expect( file, NULL, 0 );
1
0
0
0
Rémi Bernon : dinput8/tests: Add some GetForceFeedbackState / GetEffectStatus tests.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 2a4242098ac27a0def589040b90dbdc10551aee1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a4242098ac27a0def589040…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Nov 24 16:09:39 2021 +0100 dinput8/tests: Add some GetForceFeedbackState / GetEffectStatus tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput8/tests/hid.c | 436 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 381 insertions(+), 55 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2a4242098ac27a0def58…
1
0
0
0
Gabriel Ivăncescu : jscript: Access the PROTREF with proper index instead of get_prop.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 8b3afbe402f41e5de46ea9fd610336dc9d52dd2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b3afbe402f41e5de46ea9fd…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:36 2021 +0200 jscript: Access the PROTREF with proper index instead of get_prop. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index eba3b738b12..a00e36b9654 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -109,8 +109,12 @@ static inline BOOL is_function_prop(dispex_prop_t *prop) static DWORD get_flags(jsdisp_t *This, dispex_prop_t *prop) { if(prop->type == PROP_PROTREF) { - dispex_prop_t *parent = get_prop(This->prototype, prop->u.ref); - if(!parent) { + dispex_prop_t *parent = NULL; + + if(prop->u.ref < This->prototype->prop_cnt) + parent = &This->prototype->props[prop->u.ref]; + + if(!parent || parent->type == PROP_DELETED) { prop->type = PROP_DELETED; return 0; }
1
0
0
0
Gabriel Ivăncescu : jscript: Use ~0 to mark invalid bucket.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 5842ec60e26dae52d4426a404625da33baf21729 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5842ec60e26dae52d4426a40…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:35 2021 +0200 jscript: Use ~0 to mark invalid bucket. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 6e1463b1e00..eba3b738b12 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -181,8 +181,8 @@ static inline HRESULT resize_props(jsdisp_t *This) This->props = props; for(i=0; i<This->buf_size; i++) { - This->props[i].bucket_head = 0; - This->props[i].bucket_next = 0; + This->props[i].bucket_head = ~0; + This->props[i].bucket_next = ~0; } for(i=1; i<This->prop_cnt; i++) { @@ -233,14 +233,14 @@ static dispex_prop_t *alloc_protref(jsdisp_t *This, const WCHAR *name, DWORD ref static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const WCHAR *name, dispex_prop_t **ret) { const builtin_prop_t *builtin; - unsigned bucket, pos, prev = 0; + unsigned bucket, pos, prev = ~0; dispex_prop_t *prop; bucket = get_props_idx(This, hash); pos = This->props[bucket].bucket_head; - while(pos != 0) { + while(pos != ~0) { if(!wcscmp(name, This->props[pos].name)) { - if(prev != 0) { + if(prev != ~0) { This->props[prev].bucket_next = This->props[pos].bucket_next; This->props[pos].bucket_next = This->props[bucket].bucket_head; This->props[bucket].bucket_head = pos; @@ -1423,7 +1423,7 @@ static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LC /* If two identifiers differ only by case, the TypeInfo fails */ pos = This->props[get_props_idx(This, prop->hash)].bucket_head; - while (pos) + while (pos != ~0) { cur = This->props + pos; @@ -1795,6 +1795,8 @@ jsdisp_t *to_jsdisp(IDispatch *disp) HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype) { + unsigned i; + TRACE("%p (%p)\n", dispex, prototype); dispex->IDispatchEx_iface.lpVtbl = &DispatchExVtbl; @@ -1806,6 +1808,11 @@ HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *b if(!dispex->props) return E_OUTOFMEMORY; + for(i = 0; i < dispex->buf_size; i++) { + dispex->props[i].bucket_head = ~0; + dispex->props[i].bucket_next = ~0; + } + dispex->prototype = prototype; if(prototype) jsdisp_addref(prototype);
1
0
0
0
Gabriel Ivăncescu : jscript: Use to_primitive when getting the default value.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 464134c20f81b5ab2892e656c8408fb8b0f3b685 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=464134c20f81b5ab2892e656…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:34 2021 +0200 jscript: Use to_primitive when getting the default value. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 16 ++++++++- dlls/jscript/tests/run.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 5cf1e0aad81..6e1463b1e00 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1572,6 +1572,8 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc TRACE("invalid id\n"); return DISP_E_MEMBERNOTFOUND; } + if(id == DISPID_VALUE && wFlags & (DISPATCH_PROPERTYGET | DISPATCH_PROPERTYPUT)) + prop = NULL; enter_script(This->ctx, &ei); @@ -1600,7 +1602,14 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc case DISPATCH_PROPERTYGET: { jsval_t r; - hres = prop_get(This, prop, &r); + if(prop) + hres = prop_get(This, prop, &r); + else { + hres = to_primitive(This->ctx, jsval_obj(This), &r, NO_HINT); + if(hres == JS_E_TO_PRIMITIVE) + hres = DISP_E_MEMBERNOTFOUND; + } + if(SUCCEEDED(hres)) { hres = jsval_to_variant(r, pvarRes); jsval_release(r); @@ -1611,6 +1620,11 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc jsval_t val; DWORD i; + if(!prop) { + hres = DISP_E_MEMBERNOTFOUND; + break; + } + for(i=0; i < pdp->cNamedArgs; i++) { if(pdp->rgdispidNamedArgs[i] == DISPID_PROPERTYPUT) break; diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index ef0f39f1317..0e2f6333abc 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -2789,6 +2789,8 @@ static void test_retval(void) static void test_default_value(void) { + static DISPID propput_dispid = DISPID_PROPERTYPUT; + IActiveScript *script; DISPPARAMS dp = {0}; IDispatch *disp; VARIANT v; @@ -2806,9 +2808,99 @@ static void test_default_value(void) { ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); } + VariantClear(&v); + IDispatch_Release(disp); + + hres = parse_script_expr(L"var arr = [5]; arr.toString = function() {return \"foo\";}; arr.valueOf = function() {return 42;}; arr", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, NULL, NULL); + ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v)); + ok(V_I4(&v) == 42, "V_I4(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"var arr = [5]; arr.toString = function() {return \"foo\";}; arr", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, NULL, NULL); + ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + ok(!lstrcmpW(V_BSTR(&v), L"foo"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"var arr = [5]; arr", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, NULL, NULL); + ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + ok(!lstrcmpW(V_BSTR(&v), L"5"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"var obj = Object.prototype; delete obj.valueOf; obj", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, NULL, NULL); + ok(hres == S_OK, "Invoke failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + ok(!lstrcmpW(V_BSTR(&v), L"[object Object]"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"var obj = Object.prototype; delete obj.toString; obj", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, NULL, NULL); + ok(hres == DISP_E_MEMBERNOTFOUND, "Invoke failed: %08x\n", hres); + IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"Object.prototype", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + dp.cArgs = dp.cNamedArgs = 1; + dp.rgdispidNamedArgs = &propput_dispid; + dp.rgvarg = &v; + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dp, NULL, NULL, NULL); + ok(hres == DISP_E_MEMBERNOTFOUND, "Invoke failed: %08x\n", hres); + IDispatch_Release(disp); + close_script(script); + + hres = parse_script_expr(L"var f = function() {return 42;}; f", &v, &script); + ok(hres == S_OK, "parse_script_expr failed: %08x\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v)); + disp = V_DISPATCH(&v); + + V_VT(&v) = VT_EMPTY; + hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dp, NULL, NULL, NULL); + ok(hres == DISP_E_MEMBERNOTFOUND, "Invoke failed: %08x\n", hres); + IDispatch_Release(disp); + close_script(script); } static void test_script_exprs(void)
1
0
0
0
Gabriel Ivăncescu : jscript: Support deletion for accessor, builtin and idx props.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: c1861dc7d0426264280c180654b728b4a808dc3f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1861dc7d0426264280c1806…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:33 2021 +0200 jscript: Support deletion for accessor, builtin and idx props. IDX props are not configurable, thus they cannot be deleted, so it makes no sense to special-case them anyway. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 13 ++++++++----- dlls/jscript/tests/lang.js | 7 +++++++ dlls/mshtml/tests/es5.js | 15 ++++++++++++++- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 8c0d84b8023..5cf1e0aad81 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1651,14 +1651,17 @@ static HRESULT delete_prop(dispex_prop_t *prop, BOOL *ret) return S_OK; } - *ret = TRUE; /* FIXME: not exactly right */ + *ret = TRUE; - if(prop->type == PROP_JSVAL) { + if(prop->type == PROP_JSVAL) jsval_release(prop->u.val); - prop->type = PROP_DELETED; + if(prop->type == PROP_ACCESSOR) { + if(prop->u.accessor.getter) + jsdisp_release(prop->u.accessor.getter); + if(prop->u.accessor.setter) + jsdisp_release(prop->u.accessor.setter); } - if(prop->type == PROP_ACCESSOR) - FIXME("not supported on accessor property\n"); + prop->type = PROP_DELETED; return S_OK; } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index e4f5882246a..23c9c798016 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1589,6 +1589,13 @@ ok((delete tmp["test"]) === true, "delete returned false"); ok(typeof(tmp.test) === "undefined", "tmp.test type = " + typeof(tmp.test)); ok(!("test" in tmp), "test is still in tmp after delete?"); +arr = [1, 2, 3]; +ok(arr.length === 3, "arr.length = " + arr.length); +ok((delete arr.length) === false, "delete arr.length returned true"); +ok("reverse" in arr, "reverse not in arr"); +ok((delete Array.prototype.reverse) === true, "delete Array.prototype.reverse returned false"); +ok(!("reverse" in arr), "reverse is still in arr after delete from prototype"); + tmp.testWith = true; with(tmp) ok(testWith === true, "testWith !== true"); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index ede94191ab6..58b0d43e274 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -342,7 +342,8 @@ sync_test("defineProperty", function() { }, set: function(v) { getsetprop_value = v; - } + }, + configurable: true }; Object.defineProperty(obj, "getsetprop", desc); test_accessor_prop_desc(obj, "getsetprop", desc); @@ -353,6 +354,9 @@ sync_test("defineProperty", function() { test_accessor_prop_desc(obj, "getsetprop", desc); ok(obj.getsetprop === 2, "getsetprop = " + obj.getsetprop); + ok((delete obj.getsetprop) === true, "delete getsetprop returned false"); + ok(!("getsetprop" in obj), "getsetprop still in obj after delete"); + Object.defineProperty(obj, "notConf", {writable: true, enumerable: true, configurable: false, value: 1}); test_own_data_prop_desc(obj, "notConf", true, true, false); @@ -631,6 +635,15 @@ sync_test("property_definitions", function() { ok(obj[0] === 7, "obj.prop = " + obj[0]); }); +sync_test("string_idx", function() { + var s = "foobar"; + ok(s[0] === "f", "s[0] = " + s[0]); + ok(s[5] === "r", "s[5] = " + s[5]); + ok(s[6] === undefined, "s[6] = " + s[6]); + ok((delete s[0]) === false, "delete s[0] returned true"); + ok((delete s[6]) === true, "delete s[6] returned false"); +}); + sync_test("string_trim", function() { function test_trim(value, expected) { var r = String.prototype.trim.call(value);
1
0
0
0
Gabriel Ivăncescu : jscript: Throw when defining a PROTREF prop on a non-extensible object.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 3f135a0611d4fbcffc62481ae4a3695efefb0f66 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f135a0611d4fbcffc62481a…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:32 2021 +0200 jscript: Throw when defining a PROTREF prop on a non-extensible object. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 2 +- dlls/mshtml/tests/es5.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index ad6623f2648..8c0d84b8023 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -2555,7 +2555,7 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t if(FAILED(hres)) return hres; - if((!prop || prop->type == PROP_DELETED) && !obj->extensible) + if((!prop || prop->type == PROP_DELETED || prop->type == PROP_PROTREF) && !obj->extensible) return throw_error(obj->ctx, JS_E_OBJECT_NONEXTENSIBLE, name); if(!prop && !(prop = alloc_prop(obj, name, PROP_DELETED, 0))) diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 81c06a4145e..ede94191ab6 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -999,6 +999,12 @@ sync_test("preventExtensions", function() { ok(o.prop === 1, "o.prop = " + o.prop); r = Object.isExtensible(o); ok(r === false, "isExtensible(o) returned " + r); + try { + Object.defineProperty(o, "prop", { value: true }); + ok(false, "expected exception"); + }catch(e) { + ok(e.name === "TypeError", "got " + e.name + " exception"); + } r = Object.isExtensible({}); ok(r === true, "isExtensible(o) returned " + r);
1
0
0
0
Gabriel Ivăncescu : jscript: Fixup PROTREF props when looking them up.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 738894a47c7c7afa9e8464774e0ee1d0b9dbf196 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=738894a47c7c7afa9e846477…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:31 2021 +0200 jscript: Fixup PROTREF props when looking them up. Convert them to PROP_DELETE if the referenced prop in the prototype chain doesn't exist anymore. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 26 +++++++++++++++++++++++--- dlls/jscript/tests/lang.js | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index df81e1a0d99..ad6623f2648 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -60,6 +60,24 @@ struct _dispex_prop_t { int bucket_next; }; +static void fix_protref_prop(jsdisp_t *jsdisp, dispex_prop_t *prop) +{ + DWORD ref; + + if(prop->type != PROP_PROTREF) + return; + ref = prop->u.ref; + + while((jsdisp = jsdisp->prototype)) { + if(ref >= jsdisp->prop_cnt || jsdisp->props[ref].type == PROP_DELETED) + break; + if(jsdisp->props[ref].type != PROP_PROTREF) + return; + ref = jsdisp->props[ref].u.ref; + } + prop->type = PROP_DELETED; +} + static inline DISPID prop_to_id(jsdisp_t *This, dispex_prop_t *prop) { return prop - This->props; @@ -67,10 +85,11 @@ static inline DISPID prop_to_id(jsdisp_t *This, dispex_prop_t *prop) static inline dispex_prop_t *get_prop(jsdisp_t *This, DISPID id) { - if(id < 0 || id >= This->prop_cnt || This->props[id].type == PROP_DELETED) + if(id < 0 || id >= This->prop_cnt) return NULL; + fix_protref_prop(This, &This->props[id]); - return This->props+id; + return This->props[id].type == PROP_DELETED ? NULL : &This->props[id]; } static inline BOOL is_function_prop(dispex_prop_t *prop) @@ -284,6 +303,7 @@ static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash, const WCHAR *n if(prop && prop->type==PROP_DELETED) { del = prop; } else if(prop) { + fix_protref_prop(This, prop); *ret = prop; return S_OK; } @@ -292,7 +312,7 @@ static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash, const WCHAR *n hres = find_prop_name_prot(This->prototype, hash, name, &prop); if(FAILED(hres)) return hres; - if(prop) { + if(prop && prop->type != PROP_DELETED) { if(del) { del->type = PROP_PROTREF; del->u.ref = prop - This->prototype->props; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index f259c70e92e..e4f5882246a 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1569,6 +1569,8 @@ ok((delete inobj.test1) === true, "delete inobj.test1 returned false"); ok(!("test1" in inobj), "test1 is still in inobj after delete"); ok((delete inobj.test3) === true, "delete inobj.test3 returned false"); ok("test3" in inobj, "test3 is not in inobj after delete"); +ok((delete forinTestObj.prototype.test3) === true, "delete forinTestObj.prototype.test3 returned false"); +ok(!("test3" in inobj), "test3 is still in inobj after delete on prototype"); tmp = new Object(); tmp.test = false;
1
0
0
0
Gabriel Ivăncescu : jscript: Treat prototype refs as non-existent when deleting.
by Alexandre Julliard
24 Nov '21
24 Nov '21
Module: wine Branch: master Commit: 58722dfe35a1c760ba6baee809845923a409f293 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58722dfe35a1c760ba6baee8…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Nov 24 16:10:30 2021 +0200 jscript: Treat prototype refs as non-existent when deleting. Delete only affects own properties. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 5 +++++ dlls/jscript/tests/lang.js | 5 +++++ dlls/mshtml/tests/documentmode.js | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index e64a5203564..df81e1a0d99 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1621,6 +1621,11 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc static HRESULT delete_prop(dispex_prop_t *prop, BOOL *ret) { + if(prop->type == PROP_PROTREF) { + *ret = TRUE; + return S_OK; + } + if(!(prop->flags & PROPF_CONFIGURABLE)) { *ret = FALSE; return S_OK; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 63aa6696f89..f259c70e92e 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1565,6 +1565,11 @@ ok(arr["test1"] === true, "arr[test1] !== true"); ok(arr["test2"] === true, "arr[test2] !== true"); ok(arr["test3"] === true, "arr[test3] !== true"); +ok((delete inobj.test1) === true, "delete inobj.test1 returned false"); +ok(!("test1" in inobj), "test1 is still in inobj after delete"); +ok((delete inobj.test3) === true, "delete inobj.test3 returned false"); +ok("test3" in inobj, "test3 is not in inobj after delete"); + tmp = new Object(); tmp.test = false; ok((delete tmp.test) === true, "delete returned false"); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index d5f33dd9521..041025c8032 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -1192,7 +1192,6 @@ sync_test("__proto__", function() { ok(obj.__proto__ === ctor.prototype, "obj.__proto__ !== ctor.prototype"); r = (delete x.__proto__); - todo_wine. ok(r, "delete x.__proto__ returned " + r); ok(Object.prototype.hasOwnProperty("__proto__"), "__proto__ is not a property of Object.prototype after delete"); r = Object.getPrototypeOf(x);
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
96
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
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200