From c7b3a8c423602d4bf591ae68d53c8f5f14169ef3 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 10 Jun 2007 15:10:32 +0300 Subject: [PATCH] SEE: Always use SEE_no_enumerator instead of NULL. Although of SEE 2.0.1131 has a comment saying that SEE_objectclass.enumerator is optional and may be left NULL, SEE crashes if one tries to enumerate the properties of an object created from such a class. Conveniently, it provides a suitable stub function. http://www.adaptive-enterprises.com.au/bugs/show_bug.cgi?id=75 --- src/ecmascript/see/document.c | 2 +- src/ecmascript/see/form.c | 8 ++++---- src/ecmascript/see/location.c | 4 ++-- src/ecmascript/see/navigator.c | 2 +- src/ecmascript/see/unibar.c | 4 ++-- src/ecmascript/see/window.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ecmascript/see/document.c b/src/ecmascript/see/document.c index 0abcbbe3e..3e4fd5d2e 100644 --- a/src/ecmascript/see/document.c +++ b/src/ecmascript/see/document.c @@ -64,7 +64,7 @@ struct SEE_objectclass js_document_object_class = { document_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL diff --git a/src/ecmascript/see/form.c b/src/ecmascript/see/form.c index 1397a6771..fb8746d9e 100644 --- a/src/ecmascript/see/form.c +++ b/src/ecmascript/see/form.c @@ -85,7 +85,7 @@ struct SEE_objectclass js_input_object_class = { input_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL @@ -99,7 +99,7 @@ struct SEE_objectclass js_form_elems_class = { form_elems_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL @@ -113,7 +113,7 @@ struct SEE_objectclass js_forms_object_class = { forms_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL @@ -127,7 +127,7 @@ struct SEE_objectclass js_form_class = { form_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL diff --git a/src/ecmascript/see/location.c b/src/ecmascript/see/location.c index d1de913df..88f56a440 100644 --- a/src/ecmascript/see/location.c +++ b/src/ecmascript/see/location.c @@ -88,7 +88,7 @@ struct SEE_objectclass js_history_object_class = { history_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL @@ -102,7 +102,7 @@ struct SEE_objectclass js_location_object_class = { location_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL diff --git a/src/ecmascript/see/navigator.c b/src/ecmascript/see/navigator.c index aec53a14e..644dad78f 100644 --- a/src/ecmascript/see/navigator.c +++ b/src/ecmascript/see/navigator.c @@ -57,7 +57,7 @@ struct SEE_objectclass js_navigator_object_class = { navigator_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL diff --git a/src/ecmascript/see/unibar.c b/src/ecmascript/see/unibar.c index 8dd43e4a3..5cd1f8281 100644 --- a/src/ecmascript/see/unibar.c +++ b/src/ecmascript/see/unibar.c @@ -64,7 +64,7 @@ struct SEE_objectclass js_menubar_object_class = { unibar_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL @@ -78,7 +78,7 @@ struct SEE_objectclass js_statusbar_object_class = { unibar_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL diff --git a/src/ecmascript/see/window.c b/src/ecmascript/see/window.c index 0a3e79f0d..5b3d3a558 100644 --- a/src/ecmascript/see/window.c +++ b/src/ecmascript/see/window.c @@ -67,7 +67,7 @@ struct SEE_objectclass js_window_object_class = { window_hasproperty, SEE_no_delete, SEE_no_defaultvalue, - NULL, + SEE_no_enumerator, NULL, NULL, NULL