Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-06 Thread Drew Wilson
OK - I've uploaded a patch here if anyone has a chance to look at it - it's only about 11 changed lines, so it's pretty small. https://bugs.webkit.org/show_bug.cgi?id=27010 -atw On Mon, Jul 6, 2009 at 3:00 PM, Darin Adler wrote: > On Jul 6, 2009, at 2:52 PM, Drew Wilson wrote: > > BTW, I notic

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-06 Thread Darin Adler
On Jul 6, 2009, at 2:52 PM, Drew Wilson wrote: BTW, I noticed that the CustomToJS IDL attribute in HTMLCollection.idl is not implemented - instead, there's just a big hard-coded list of classes in CodeGeneratorJS.pm::UsesManualToJSImplementation() that corresponds to that functionality.

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-06 Thread Drew Wilson
BTW, I noticed that the CustomToJS IDL attribute in HTMLCollection.idl is not implemented - instead, there's just a big hard-coded list of classes in CodeGeneratorJS.pm::UsesManualToJSImplementation() that corresponds to that functionality. Any reason not to get rid of UsesManualToJSImplementation(

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-04 Thread Maciej Stachowiak
On Jul 4, 2009, at 11:52 AM, Drew Wilson wrote: 1) I don't ever actually want a raw JSAbstractWorker to be created - is there a way to disable the toJS() generation? It looks like maybe CustomToJS might've let me do this, but it still defines toJS() in the AbstractWorker.h file. I'd rath

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-04 Thread Drew Wilson
Thanks for the insights. I stepped through the worker constructor code. The problem was at the very last line, where we create a JS wrapper object around the core WebCore::Worker object: return asObject(toJS(exec, worker.release())); Before I changed Worker.idl to have Worker derive from the

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-03 Thread Sam Weinig
On Fri, Jul 3, 2009 at 2:42 PM, Drew Wilson wrote: > I'm working on refactoring some code out of WebCore::Worker into a common > base class to be shared between SharedWorker and Worker. > So I've defined a new AbstractWorker.idl and its associated JS bindings. > AbstractWorker is not intended to

Re: [webkit-dev] Inheritance in IDL files/JS bindings

2009-07-03 Thread Maciej Stachowiak
On Jul 3, 2009, at 2:42 PM, Drew Wilson wrote: Is there anything special I need to do when implementing inheritance in IDL files and JS bindings? I *think* I'm correctly following the example of other places where we use inheritance (example HTMLElement -> Element -> Node), although ther

[webkit-dev] Inheritance in IDL files/JS bindings

2009-07-03 Thread Drew Wilson
I'm working on refactoring some code out of WebCore::Worker into a common base class to be shared between SharedWorker and Worker. So I've defined a new AbstractWorker.idl and its associated JS bindings. AbstractWorker is not intended to be instantiable, so I don't have a constructor generated for