Please don’t use `JSC::Strong` in WebCore. Such a code often leads to memory 
leaks, and it’s almost always wrong.

Often times, the correct solution is to use `JSC::Weak` and either visit 
children or opaque roots to keep it alive:
https://docs.webkit.org/Deep%20Dive/Architecture/JSWrappers.html#opaque-roots
If you’re not sure or don’t know how to use them correctly, come talk to me or 
anyone else familiar with JS DOM bindings.

Reviewers, please don’t r+ a patch which uses JSC::Strong unless you’re 
absolutely confident that it does not lead to a memory leak. The vast majority 
of PRs that use JSC::Strong should be outright r-'ed.

- R. Niwa

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to