Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: extensions/browser/extension_function.cc

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments -> round 1 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_function.cc
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index b11621fa96e4f3a7d2d57e75ec829f9db0ee22b9..53de37b13d36e434459cf8a24c276243ad87c81b 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -441,6 +441,9 @@ UIThreadExtensionFunction::render_view_host_do_not_use() const {
void UIThreadExtensionFunction::SetRenderFrameHost(
content::RenderFrameHost* render_frame_host) {
+ // An extension function from Service Worker does not have a RenderFrameHost.
+ if (!render_frame_host)
+ return;
DCHECK_NE(render_frame_host_ == nullptr, render_frame_host == nullptr);
render_frame_host_ = render_frame_host;
tracker_.reset(

Powered by Google App Engine
This is Rietveld 408576698