[Webkit-unassigned] [Bug 141809] New: [JSObjCClassInfo reallocateConstructorAndOrPrototype] should also reallocate super class prototype chain

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 19 13:36:33 PST 2015


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

            Bug ID: 141809
           Summary: [JSObjCClassInfo reallocateConstructorAndOrPrototype]
                    should also reallocate super class prototype chain
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mark.lam at apple.com

A ObjC class that implement the JSExport protocol will have a JS prototype chain and constructor automatically synthesized for its JS wrapper object.  However, if there are no more instances of that ObjC class reachable by a GC root scan, then its synthesized prototype chain and constructors may be released by the GC.  If a new instance of that ObjC class is instantiated, then [JSObjCClassInfo reallocateConstructorAndOrPrototype] should re-construct the prototype chain and constructor (if they were released).  However, the current implementation only re-constructs the immediate prototype, but not every other prototype object upstream in the prototype chain.

The fix is to have [JSObjCClassInfo reallocateConstructorAndOrPrototype] recurse and call itself for the super class if the super class' prototype is not initialized (implying that the super class also needs to re-construct its prototype and constructor).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150219/e0d410ac/attachment-0002.html>


More information about the webkit-unassigned mailing list