[webkit-reviews] review granted: [Bug 93661] [JSC] MutationObservers should not create circular, leaky references : [Attachment 185095] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 17:12:33 PST 2013


Adam Barth <abarth at webkit.org> has granted Adam Klein <adamk at chromium.org>'s
request for review:
Bug 93661: [JSC] MutationObservers should not create circular, leaky references
https://bugs.webkit.org/show_bug.cgi?id=93661

Attachment 185095: Patch
https://bugs.webkit.org/attachment.cgi?id=185095&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=185095&action=review


This looks good provided it's safe to ref the DOMWrapperWorld.

> Source/WebCore/bindings/js/JSMutationCallback.h:47
> +    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE
{ return ContextDestructionObserver::scriptExecutionContext(); }

I think you can do this with the "using" directive.

> Source/WebCore/bindings/js/JSMutationCallback.h:53
> +    RefPtr<DOMWrapperWorld> m_isolatedWorld;

Is it safe to ref the DOMWrapperWorld?	For example, does the DOMWrapperWorld
keep the global object alive, which might keep the mutation observer instance
alive, which keeps the JSMutationCallback alive?


More information about the webkit-reviews mailing list