Since Audio object will be instantiated via JS, we need to add extra 2 lines to that huge switch statement in V8Proxy::GetTemplate:
case V8ClassIndex::HTMLIMAGEELEMENT: desc->SetCallHandler(USE_CALLBACK(HTMLImageElementConstructor)); break; :DG< On Fri, Jun 19, 2009 at 10:05 AM, kylep<ky...@chromium.org> wrote: > > Ok, I see what you mean, but the macro in v8_proxy.h points to > DOM_NODE_TYPES in v8_index.h, which includes VIDEO_HTMLELEMENT_TYPES > (V), which conditionally defines V(HTMLAUDIOELEMENT, > HTMLAudioElement) if video is enabled (which it is in webkit.gyp). So > although that's not exactly the same as image, it looks like that > binding does exist. Just because it's another layer away shouldn't > mean the audio element isn't a node, correct? I did some more digging, > and everything looks ok in HTMLElementFactory.cpp... I have no idea > what I'm still missing. > > On Jun 18, 8:38 pm, Dimitri Glazkov <dglaz...@google.com> wrote: >> You're almost there. You also need to make sure to register it in >> v8_proxy.cpp (look for Image as a pattern to follow). >> >> BTW, with gyp, dependencies in bindings are pretty robust. No need to >> clobber anymore. >> >> :DG< >> >> >> >> On Thu, Jun 18, 2009 at 4:05 PM, kylep<ky...@chromium.org> wrote: >> >> > Ok, so. So far I've created a new file >> > V8HTMLAudioElementConstructor.cpp and modeled it off >> > V8HTMLImageElementConstructor.cpp (changing all "image"s to "audio"s, >> > plus modified V8CustomBinding.h and webkit.gyp. Change is here: >> >http://codereview.chromium.org/132036 >> > But I'm still getting "TypeError: Illegal constructor" when I try to >> > call the audio constructor. Is there another hook I'm missing? >> >> > On Jun 16, 11:47 am, Dimitri Glazkov <dglaz...@google.com> wrote: >> >> A good place to start would be to look at existing *Constructor.cpp >> >> files in WebCore/bindings/v8 and see how they are hooked in (like >> >> Image constructor). Also, you have dimich and levin in close proximity >> >> you who have added a V8 constructor or two in the past (I think). >> >> >> ;DG< >> >> >> On Mon, Jun 15, 2009 at 5:47 PM, Kyle Prete<ky...@chromium.org> wrote: >> >> > Hey I'm looking into these layout tests: >> >> > LayoutTests/media/audio-constructor-src.html >> >> > LayoutTests/media/audio-constructor.html >> >> > LayoutTests/media/constructors.html >> >> > and I need to know how constructors are generated. The failures all >> >> > appear >> >> > to be due to the Audio constructor, specifically: "TypeError: Illegal >> >> > constructor" >> >> > Thanks. > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---