Index: extensions/renderer/guest_view/extensions_guest_view_container.cc |
diff --git a/extensions/renderer/guest_view/extensions_guest_view_container.cc b/extensions/renderer/guest_view/extensions_guest_view_container.cc |
index 96650d84ff934b36606217dda45b2351076330b8..3fa9882a9cd013d6cd689f5677108529eb883450 100644 |
--- a/extensions/renderer/guest_view/extensions_guest_view_container.cc |
+++ b/extensions/renderer/guest_view/extensions_guest_view_container.cc |
@@ -13,7 +13,6 @@ namespace extensions { |
ExtensionsGuestViewContainer::ExtensionsGuestViewContainer( |
content::RenderFrame* render_frame) |
: GuestViewContainer(render_frame), |
- destruction_isolate_(nullptr), |
element_resize_isolate_(nullptr), |
weak_ptr_factory_(this) { |
} |
@@ -22,33 +21,6 @@ ExtensionsGuestViewContainer::~ExtensionsGuestViewContainer() { |
} |
void ExtensionsGuestViewContainer::OnDestroy(bool embedder_frame_destroyed) { |
- // Do not attempt to run |destruction_callback_| if the embedder frame was |
- // destroyed. Trying to invoke callback on RenderFrame destruction results in |
- // assertion failure when calling WebScopedMicrotaskSuppression. |
- if (embedder_frame_destroyed) |
- return; |
- |
- // Call the destruction callback, if one is registered. |
- if (!destruction_callback_.IsEmpty()) { |
- v8::HandleScope handle_scope(destruction_isolate_); |
- v8::Local<v8::Function> callback = v8::Local<v8::Function>::New( |
- destruction_isolate_, destruction_callback_); |
- v8::Local<v8::Context> context = callback->CreationContext(); |
- if (context.IsEmpty()) |
- return; |
- |
- v8::Context::Scope context_scope(context); |
- blink::WebScopedMicrotaskSuppression suppression; |
- |
- callback->Call(context->Global(), 0 /* argc */, nullptr); |
- } |
-} |
- |
-void ExtensionsGuestViewContainer::RegisterDestructionCallback( |
- v8::Local<v8::Function> callback, |
- v8::Isolate* isolate) { |
- destruction_callback_.Reset(isolate, callback); |
- destruction_isolate_ = isolate; |
} |
void ExtensionsGuestViewContainer::RegisterElementResizeCallback( |