Skip to content
Permalink
Browse files

Change the signature of onDropViewInstance. issue #5053

Summary:
#5053
Closes #5125

Reviewed By: svcscm

Differential Revision: D2807202

Pulled By: foghina

fb-gh-sync-id: 1e268c940a08aa7bf243971ba91d4595973f12af
  • Loading branch information...
deminoth authored and facebook-github-bot-9 committed Jan 6, 2016
1 parent 1bfd267 commit daa93a622273873cdee53c546f6d876f4e271e70
@@ -424,9 +424,7 @@ protected final void dropView(View view) {
UiThreadUtil.assertOnUiThread();
if (!mRootTags.get(view.getId())) {
// For non-root views we notify viewmanager with {@link ViewManager#onDropInstance}
resolveViewManager(view.getId()).onDropViewInstance(
(ThemedReactContext) view.getContext(),
view);
resolveViewManager(view.getId()).onDropViewInstance(view);
}
ViewManager viewManager = mTagsToViewManagers.get(view.getId());
if (view instanceof ViewGroup && viewManager instanceof ViewGroupManager) {
@@ -92,7 +92,7 @@ public final T createView(
* Called when view is detached from view hierarchy and allows for some additional cleanup by
* the {@link ViewManager} subclass.
*/
public void onDropViewInstance(ThemedReactContext reactContext, T view) {
public void onDropViewInstance(T view) {
}

/**
@@ -323,9 +323,9 @@ public void receiveCommand(WebView root, int commandId, @Nullable ReadableArray
}

@Override
public void onDropViewInstance(ThemedReactContext reactContext, WebView webView) {
super.onDropViewInstance(reactContext, webView);
reactContext.removeLifecycleEventListener((ReactWebView) webView);
public void onDropViewInstance(WebView webView) {
super.onDropViewInstance(webView);
((ThemedReactContext) webView.getContext()).removeLifecycleEventListener((ReactWebView) webView);
((ReactWebView) webView).cleanupCallbacksAndDestroy();
}
}

0 comments on commit daa93a6

Please sign in to comment.
You can’t perform that action at this time.