Index: content/shell/browser/shell_android.cc |
diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc |
index 80a653e41b2b07f144703c390b787564a5cb1105..b11ba37abaa1d3c7eba35fbc76ddf17159853ba2 100644 |
--- a/content/shell/browser/shell_android.cc |
+++ b/content/shell/browser/shell_android.cc |
@@ -30,10 +30,6 @@ void Shell::PlatformExit() { |
} |
void Shell::PlatformCleanUp() { |
- JNIEnv* env = AttachCurrentThread(); |
- if (java_object_.is_null()) |
- return; |
- Java_Shell_onNativeDestroyed(env, java_object_.obj()); |
} |
void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
@@ -87,7 +83,8 @@ bool Shell::PlatformIsFullscreenForTabOrPending( |
} |
void Shell::Close() { |
- RemoveShellView(java_object_.obj()); |
+ CloseShellView(java_object_.obj()); |
+ java_object_.Reset(); |
delete this; |
} |
@@ -96,10 +93,4 @@ bool Shell::Register(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |
-// static |
-void CloseShell(JNIEnv* env, jclass clazz, jlong shellPtr) { |
- Shell* shell = reinterpret_cast<Shell*>(shellPtr); |
- shell->Close(); |
-} |
- |
} // namespace content |