Fix ART after Native -> Host rename

This commit is contained in:
Ben Alpert
2016-05-24 16:44:33 -07:00
parent 7ecff6a437
commit 769ab715c2
5 changed files with 10 additions and 5 deletions
+1
View File
@@ -23,6 +23,7 @@ var paths = {
'!src/**/__benchmarks__/**/*.js',
'!src/**/__tests__/**/*.js',
'!src/**/__mocks__/**/*.js',
'!src/renderers/art/**/*.js',
'!src/shared/vendor/**/*.js',
],
lib: 'build/modules',
+1 -1
View File
@@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactARTFifteen
* @providesModule ReactART
*/
'use strict';
+2 -2
View File
@@ -14,7 +14,7 @@
'use strict';
jest
.unmock('ReactARTFifteen');
.unmock('ReactART');
var React = require('React');
var ReactDOM = require('ReactDOM');
@@ -27,7 +27,7 @@ var TestComponent;
var Missing = {};
var ReactART = require('ReactARTFifteen');
var ReactART = require('ReactART');
var ARTSVGMode = require('art/modes/svg');
var ARTCurrentMode = require('art/modes/current');
@@ -154,11 +154,10 @@ if (__DEV__) {
return inst._debugID;
};
setParentForInstrumentation = function(child) {
invariant(child._debugID != null, 'mooooooooooooooooooo');
if (child._debugID !== 0) {
ReactInstrumentation.debugTool.onSetParent(
child._debugID,
getDebugID(this._debugID)
getDebugID(this)
);
}
};
@@ -106,6 +106,11 @@ function instantiateReactComponent(node) {
// representations. I.e. ART. Once those are updated to use the string
// representation, we can drop this code path.
instance = new element.type(element);
// We renamed this. Allow the old name for compat. :(
if (!instance.getHostNode) {
instance.getHostNode = instance.getNativeNode;
}
} else {
instance = new ReactCompositeComponentWrapper(element);
}