@samitouri / QOS-React-2 / commits / 9315517dec

Don't use owner to determine if the auto-bailout should be used

I didn't realize that we actually special cased this. This is an unfortunate heuristic but it helps minimize the harm that this optimization does.

Sebastian Markbage committed Aug 18, 2015 at 17:33 UTC 9315517dec300e8ba9a9e24709e4efe57f515f1f
2 files changed +9 -2
src/renderers/dom/client/wrappers/__tests__/ReactDOMSelect-test.js
+8 -1
@@ -226,7 +226,14 @@ describe('ReactDOMSelect', function() {
226
227 // Changing the `value` prop should change the selected options.
228 objectToString.animal = 'monkey';
229 - ReactDOM.render(el, container);
229 +
230 + var el2 =
231 + <select multiple={true} value={[objectToString]}>
232 + <option value="monkey">A monkey!</option>
233 + <option value="giraffe">A giraffe!</option>
234 + <option value="gorilla">A gorilla!</option>
235 + </select>;
236 + ReactDOM.render(el2, container);
237
238 expect(node.options[0].selected).toBe(true); // monkey
239 expect(node.options[1].selected).toBe(false); // giraffe
src/renderers/shared/reconciler/ReactReconciler.js
+1 -1
@@ -65,8 +65,8 @@ var ReactReconciler = {
65 internalInstance, nextElement, transaction, context
66 ) {
67 var prevElement = internalInstance._currentElement;
68 +
69 if (nextElement === prevElement &&
69 - nextElement._owner != null &&
70 context === internalInstance._context
71 ) {
72 // Since elements are immutable after the owner is rendered,