Skip to content

Commit 8181272

Browse files
committed
Drop inaccessible methods
These are no longer accessible and the isOwnedBy check is only used in a method that is not accessible.
1 parent a194e51 commit 8181272

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/core/ReactComponent.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -416,34 +416,6 @@ var ReactComponent = {
416416
mountImageIntoNode(markup, container, shouldReuseMarkup);
417417
},
418418

419-
/**
420-
* Checks if this component is owned by the supplied `owner` component.
421-
*
422-
* @param {ReactComponent} owner Component to check.
423-
* @return {boolean} True if `owners` owns this component.
424-
* @final
425-
* @internal
426-
*/
427-
isOwnedBy: function(owner) {
428-
return this._owner === owner;
429-
},
430-
431-
/**
432-
* Gets another component, that shares the same owner as this one, by ref.
433-
*
434-
* @param {string} ref of a sibling Component.
435-
* @return {?ReactComponent} the actual sibling Component.
436-
* @final
437-
* @internal
438-
*/
439-
getSiblingByRef: function(ref) {
440-
var owner = this._owner;
441-
if (!owner || !owner.refs) {
442-
return null;
443-
}
444-
return owner.refs[ref];
445-
},
446-
447419
/**
448420
* Get the publicly accessible representation of this component - i.e. what
449421
* is exposed by refs and renderComponent. Can be null for stateless

src/core/ReactOwner.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,6 @@ var ReactOwner = {
126126
* @private
127127
*/
128128
attachRef: function(ref, component) {
129-
// TODO: Remove this invariant. This is never exposed and cannot be called
130-
// by user code. The unit test is already removed.
131-
invariant(
132-
component.isOwnedBy(this),
133-
'attachRef(%s, ...): Only a component\'s owner can store a ref to it.',
134-
ref
135-
);
136129
var inst = this.getPublicInstance();
137130
var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs;
138131
refs[ref] = component.getPublicInstance();

0 commit comments

Comments
 (0)