From 4af5c55c8dcd49f52b9772da61f34fa8e732fb47 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 11 May 2020 11:13:30 -0700 Subject: [PATCH] chore: add DCHECK to ensure extension_system() is not used for in-memory sessions (#23475) --- shell/browser/electron_browser_context.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index b9659bc6d9..e0a17ad472 100644 --- a/shell/browser/electron_browser_context.h +++ b/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