[webkit-dev] JSObjectSetProperty & JSObjectHasProperty stuck in an infinite loop
Geoffrey Garen
ggaren at apple.com
Thu Feb 5 11:20:29 PST 2009
Hi Laurent.
The API shouldn't have any subtle dependency on
kJSClassAttributeNoAutomaticPrototype. Please file a bug report @
bugs.webkit.or, and attach a source file that we can compile in order
to reproduce this bug.
Thanks,
Geoff
On Feb 4, 2009, at 1:55 PM, Laurent Calburtin wrote:
> Hi,
>
> With the trunk version of javascriptcore, JSObjectHasProperty is
> stuck in an infinite loop with following code:
>
> JSClassDefinition globalObjectClassDefinition =
> kJSClassDefinitionEmpty;
> globalObjectClassDefinition.staticFunctions =
> globalObject_staticFunctions; // not null
> JSClassRef globalObjectClass =
> JSClassCreate( &globalObjectClassDefinition);
> JSGlobalContextRef context = JSGlobalContextCreateInGroup(NULL,
> globalObjectClass);
> JSStringRef propName = JSStringCreateWithUTF8CString("name");
> JSObjectHasProperty( context, JSContextGetGlobalObject(context),
> propName);
>
> By comparing my code to testapi.c I found that adding the attribute
> kJSClassAttributeNoAutomaticPrototype to my global class definition
> solved the problem.
>
> Is this a bug or an expected behavior?
> If kJSClassAttributeNoAutomaticPrototype is mandatory in such a
> situation, may I suggest to state it in the header file?
> Are there other situations I should use
> kJSClassAttributeNoAutomaticPrototype?
>
> Note that JSObjectSetProperty is also stuck without the attribute
> because it internally calls the same code as JSObjectHasProperty.
> Also note that JSObjectHasProperty from MacOSX10.5 webkit framework
> doesn't get stuck.
>
> Laurent
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
More information about the webkit-dev
mailing list