:art:
authorKevin Sawicki <kevinsawicki@gmail.com>
Tue, 13 Dec 2016 19:07:17 +0000 (11:07 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Mon, 16 Jan 2017 20:38:16 +0000 (12:38 -0800)
atom/renderer/atom_renderer_client.cc

index 4339a19..1215c80 100644 (file)
@@ -110,12 +110,10 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver {
 
   void WillReleaseScriptContext(v8::Local<v8::Context> context,
                                 int world_id) override {
-    if (isolated_world_) {
-      if (IsIsolatedWorld(world_id))
-        renderer_client_->WillReleaseScriptContext(context, render_frame_);
-    } else if (IsMainWorld(world_id)) {
+    bool notify_client =
+      isolated_world_ ? IsIsolatedWorld(world_id) : IsMainWorld(world_id);
+    if (notify_client)
       renderer_client_->WillReleaseScriptContext(context, render_frame_);
-    }
   }
 
   void OnDestruct() override {