Changes between Version 11 and Version 12 of DOMInJavaScript
- Timestamp:
- Sep 28, 2012, 7:16:45 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DOMInJavaScript
v11 v12 39 39 40 40 Cons: 41 * We need to create wrappers for DOM objects that are not touched by JS. This would not be a problem for JS-heavy workloads but might become a problem for JS-light workloads. For JS-light workloads, the mandatory-wrapper approach might end up increasing the number of wrappers in a JS heap and regresses performance of GC.41 * We need to create wrappers for DOM objects that are not touched by JS. This would not be a problem for JS-heavy workloads (because most of DOM objects will be anyway touched by JS) but might become a problem for JS-light workloads. For JS-light workloads, the mandatory-wrapper approach might end up increasing the number of wrappers in a JS heap and thus regress performance of GC. 42 42 43 43 === Option 2: Wrappers are optional 44 44 45 This approach creates wrappers for only DOM objects that are touched by JS as is done in the current JSC/V8 + WebKit. As a fast path, in a case where a wrapper objectexists, .nextSibling is realized by normal JavaScript property access. As a slow path, in a case where a wrapper object does not exist, .nextSibling is realized by Node::nextSibling() as is done in the current WebKit.45 This approach creates wrappers only for DOM objects that are touched by JS, as is done in the current JSC/V8 + WebKit. As a fast path, in a case where a wrapper exists, .nextSibling is realized by normal JavaScript property access. As a slow path, in a case where a wrapper object does not exist, .nextSibling is realized by Node::nextSibling() as is done in the current WebKit. 46 46 47 47 Pros: