Browse Source

chore: add DCHECK to ensure extension_system() is not used for in-memory sessions (#23475)

Samuel Attard 5 years ago
parent
commit
4af5c55c8d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      shell/browser/electron_browser_context.h

+ 3 - 2
shell/browser/electron_browser_context.h

@@ -139,9 +139,10 @@ class ElectronBrowserContext
   }
 
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-  // Guard usages of extension_system() with !IsOffTheRecord()
-  // There is no extension system for in-memory sessions
   extensions::ElectronExtensionSystem* extension_system() {
+    // Guard usages of extension_system() with !IsOffTheRecord()
+    // There is no extension system for in-memory sessions
+    DCHECK(!IsOffTheRecord());
     return extension_system_;
   }
 #endif