RESOLVED FIXED 22493
Abstract away JSC:: usage in WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=22493
Summary Abstract away JSC:: usage in WebCore/html
Darin Fisher (:fishd, Google)
Reported 2008-11-25 13:47:35 PST
Abstract away the JSC:: in WebCore/html/ My proposal is to define the following types: typedef RefPtr<JSC::Bindings::Instance> ScriptInstance; typedef PassRefPtr<JSC::Bindings::Instance> PassScriptInstance; Then, I will use these types in HTMLPlugInElement.{h,cpp}. The result will enable V8 bindings to work with HTMLPlugInElement without any modifications or #ifdefs. The key here is that V8 bindings does not have something like JSC::Bindings::Instance. Instead, the HTMLPlugInElement's getInstance method simply vends a V8Object that is pre-bound to the underlying NPObject returned by the plugin's getValue function. I thought about changing the JSC build to also vend a JSValue* from HTMLPlugInElement::getInstance, but that wouldn't work out too well since there is not an ExecState available at the time when getInstance is called. Hence, the typedef solution that I'm proposing, which seems to allow the greatest flexibility.
Attachments
v1 patch (12.80 KB, patch)
2008-11-25 14:09 PST, Darin Fisher (:fishd, Google)
ggaren: review+
Darin Fisher (:fishd, Google)
Comment 1 2008-11-25 14:09:49 PST
Created attachment 25501 [details] v1 patch
Geoffrey Garen
Comment 2 2008-11-25 17:15:58 PST
Comment on attachment 25501 [details] v1 patch r=me
Darin Fisher (:fishd, Google)
Comment 3 2008-11-25 17:19:49 PST
Darin Fisher (:fishd, Google)
Comment 4 2008-11-25 18:21:33 PST
Windows bustage fix: http://trac.webkit.org/changeset/38777 This change was required because runtime.h is now exposed via ScriptInstance.h, forcing it to be a "private" header that WebKit.vcproj can see.
Note You need to log in before you can comment on or make changes to this bug.