[Webkit-unassigned] [Bug 77295] V8 idl code generator doesn't handle [CachedAttribute] on SerializedScriptValue attributes.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 30 13:39:21 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77295





--- Comment #9 from Pablo Flouret <pablof at motorola.com>  2012-01-30 13:39:21 PST ---
(In reply to comment #7)
> (From update of attachment 124462 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124462&action=review
> 
> >>> Source/WebCore/Modules/intents/Intent.idl:34
> >>> +        readonly attribute [InitializedByConstructor] SerializedScriptValue data;
> >> 
> >> You do not need to add [InitializedByConstructor] here. Sorry, [InitializedByConstructor] is mis-renamed and it should be [InitializedByEventConstructor]. It is used by Event constructors only (i.e. [ConstructorTemplate=Event]). I'll rename it later.
> >> 
> >> Would you write a patch, ignoring [InitializedByConstructor] cases? Then, the patch would become much simpler.
> > 
> > Yeah, [InitializedByConstructor] is wrongly used here, that's what i meant when i said i was hijacking the meaning, but i was somehow trying to preserve the behavior introduced by https://bugs.webkit.org/show_bug.cgi?id=36892 and https://bugs.webkit.org/show_bug.cgi?id=75641
> > 
> > What i'm trying to do is something more akin to what the JSC generator does for SerializedScriptValue attributes. It generates getters/setters that deserialize the value when they're called (and cache the deserialized value in a member in the object if [CachedAttribute] is specified), which is not done in the v8 generator.
> > Instead there's code to deserialize one (and only one) SerializedScriptValue attribute upfront in the constructor and ForceSet:tting it in the object, avoiding the generation and use of getters/setters.
> > If i understood things correctly this was initially set up like that because MessageEvent needed the data deserialized in the right context (which presumably would not be the correct one if deserialized lazily in a getter?). It looks like the webintents case would be handled correctly.
> > 
> > Do you think we can do something to not special case what MessageEvent needs so that we can generate the getter/setter functions and do everything the same way?
> 
> Ah, I got it. But still I have some questions.
> 
> Why is this line not "readonly attribute [CachedAttribute] SerializedScriptValue data"? What you want to do is to make it work, isn't it?

I was trying to preserve a behavior that i thought was introduced just for MessageEvent, but that one is actually using custom getter/setters so i'll just get rid of the whole [InitializedByConstructor] faux handling and make a proper patch. Sorry for the misunderstanding.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list