Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
12.0.1
What operating system are you using?
Windows
Operating System Version
Windows 10 Pro 2020
What arch are you using?
x64
Last Known Working Electron version
11.3.0
Expected Behavior
The app works perfectly fine with an embedded video player.
Actual Behavior
The app crashes when creating an element with an embedded video player.
Testcase Gist URL
https://github.com/pavladan/mpv.js-on-react
Change the version of electron to 12.0.1 to see the crash, 11.3.0 works perfectly fine.
Note: In order to see the crash on 12.0.1, adjustments to the settings must be made
const win = new BrowserWindow({
width: 1280,
height: 574,
autoHideMenuBar: true,
useContentSize: process.platform !== "linux",
title: "mpv.js example player",
webPreferences: {
nodeIntegration: true,
plugins: true,
enableRemoteModule: true,
nodeIntegrationInSubFrames: true,
contextIsolation: false,
worldSafeExecuteJavaScript: false
},
});
Thanks for that crash dump @NADESHIKON, that gives me everything I need to solve this issue 🙂
Here’s the symbolicated stack trace:
That’s a
CHECK
on this line: https://source.chromium.org/chromium/chromium/src/+/refs/tags/89.0.4389.82:content/browser/plugin_service_impl.cc;l=202My best guess is that the actual
CHECK
being hit is inorigin_lock.value()
(optional.h:648), i.e.origin_lock
is empty. This would be the case ifIsOriginIsolatedPepperPlugin
returned false (render_frame_impl.cc:2687), which is the case for everything except the PDF plugin. This code should only be getting hit if the plugin is requesting the PDF permission, but I think command-line plugins request all permissions.This change seems to have been introduced by https://source.chromium.org/chromium/chromium/src/+/37893bf803b256be100b1bd1805abcd069c33140, which states in the commit message:
That change also started returning
true
from IsOriginIsolatedPepperPlugin for almost everything. We should probably follow suit.