RESOLVED WONTFIX 73903
[V8] Multiple VMs: support <script type>with types other than JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=73903
Summary [V8] Multiple VMs: support <script type>with types other than JavaScript.
Pavel Podivilov
Reported 2011-12-06 03:30:42 PST
The idea is to have a generic ScriptController that evaluates script element's source code using one of its sub-controllers based on mime-type.
Attachments
[DRAFT] (7.58 KB, patch)
2011-12-06 03:35 PST, Pavel Podivilov
no flags
Pavel Podivilov
Comment 1 2011-12-06 03:35:53 PST
Created attachment 118018 [details] [DRAFT] The attached patch illustrates one possible implementation. With this patch, ScriptController is still a JavaScript controller with additional sub-controller, but it could be refactored into a generic controller.
Eric Seidel (no email)
Comment 2 2011-12-06 12:22:00 PST
Comment on attachment 118018 [details] [DRAFT] View in context: https://bugs.webkit.org/attachment.cgi?id=118018&action=review > Source/WebCore/bindings/v8/ScriptController.h:74 > +class AbstractController : public RefCounted<AbstractController> { > +public: > + virtual ~AbstractController() {} > + > + virtual bool isScriptTypeSupported(const String& mimeType) = 0; > + virtual void evaluate(const ScriptSourceCode&) = 0; > + virtual void bindToWindowObject(Frame*, const String& key, NPObject*) = 0; > + virtual void clearWindowShell() = 0; > +}; > + This is a really horrible class name. It's still a ScriptConroller... just of a diferent kind of script. > Source/WebCore/bindings/v8/ScriptController.h:202 > + AbstractController* controller(const String& name); This would need to be conrollerForMimeType? > Source/WebCore/bindings/v8/ScriptController.h:214 > + typedef HashMap<String, RefPtr<AbstractController> > ControllerMap; > + ControllerMap m_controllers; > + Again, way too generic of names.
Note You need to log in before you can comment on or make changes to this bug.