diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index cb476425012d..dd0f98ee50c9 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -1888,6 +1888,11 @@ nsFrameLoader::EnsureMessageManager() if (NS_FAILED(rv)) { return rv; } + + if (!mIsTopLevelContent) { + return NS_OK; + } + if (mMessageManager) { #ifdef MOZ_IPC if (ShouldUseRemoteProcess()) {