[Webkit-unassigned] [Bug 70421] V8 bindings: event listener can be garbage collected, causing events loss

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 14 04:38:44 PST 2011


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





--- Comment #5 from anton muhin <antonm at chromium.org>  2011-11-14 04:38:44 PST ---
(From update of attachment 114561)
View in context: https://bugs.webkit.org/attachment.cgi?id=114561&action=review

Very nice, thanks a lot!

> Source/WebCore/bindings/v8/V8GCController.cpp:146
> +template<typename T> inline bool GCPrologueSpecialCase(T* object, v8::Persistent<v8::Object> wrapper, WrapperTypeInfo* typeInfo)

maybe just provide no definition to get link time error?

> Source/WebCore/bindings/v8/V8GCController.cpp:176
> +template<typename T> class GCPrologueVisitor : public DOMWrapperMap<T>::Visitor {

Can we avoid specialization tricks?  We can just pass a trait which does a special processing.  Something like:

struct MessagePortHandler {
  static bool process(void* object, ....) { .... }
};

struct NodeHandler {
  static bool process(....)
}

And now visitDOMWrapper(....) {
  ...
  if (Processor::process(...)) {
    ...
  }
}

WDYT?

> Source/WebCore/bindings/v8/V8GCController.cpp:411
> +template<typename T, v8::WeakReferenceCallback callback> struct GCEpilogueHelper {

ditto

-- 
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