Skip to content
efb1abd fix: register webview in main world when using contextIsolation
6 successful , and 1 neutral checks

Backportable? - 4-0-x

Neutral

ran Dec 14, 2018 in about 1 hour with 3 failures

efb1abd by @zcbenz

fix-webview-in-contextisolation

Cancelled

This trop check was cancelled and can be ignored as this PR is no longer targeting this branch for a backport

Details

Failed Diff:

diff --cc lib/renderer/init.js
index c65c606,af11478..0000000
--- a/lib/renderer/init.js
+++ b/lib/renderer/init.js
@@@ -83,9 -97,13 +83,19 @@@ if (window.location.protocol === 'chrom
    require('@electron/internal/renderer/content-scripts-injector')
  
    // Load webview tag implementation.
++<<<<<<< 80ef11626527b293e214f001a2e97f28cfc56dd1
 +  if (webviewTag && process.guestInstanceId == null) {
 +    require('@electron/internal/renderer/web-view/web-view')
 +    require('@electron/internal/renderer/web-view/web-view-attributes')
++=======
+   if (webviewTag && guestInstanceId == null) {
+     const { setupWebView } = require('@electron/internal/renderer/web-view/web-view')
+     if (contextIsolation) {
+       v8Util.setHiddenValue(window, 'setup-webview', setupWebView)
+     } else {
+       setupWebView(window)
+     }
++>>>>>>> fix: register webview in main world when using contextIsolation
    }
  }
  

Annotations

Check failure on line 11 in lib/isolated_renderer/init.js

@trop trop / Backportable? - 4-0-x

lib/isolated_renderer/init.js#L6-L11

Patch Conflict
Raw output
++<<<<<<< b2913e5b7c63dd178bc716ba8a56ae474a51e5d8
 +const { send, sendSync } = binding
 +
 +const ipcRenderer = {
 +  send (...args) {
 +    return send('ipc-internal-message', args)
 +  },
++=======
+ window.isolatedWorld = isolatedWorld
+ 
+ // Note: Don't use "process", as it will be replaced by browserify's one.
+ const v8Util = nodeProcess.atomBinding('v8_util')
+ 
+ const setupWebView = v8Util.getHiddenValue(isolatedWorld, 'setup-webview')
+ if (setupWebView) {
+   setupWebView(window)
+ }
+ 
+ const isolatedWorldArgs = v8Util.getHiddenValue(isolatedWorld, 'isolated-world-args')
+ const { ipcRenderer, guestInstanceId, hiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
++>>>>>>> fix: register webview in main world when using contextIsolation

Check failure on line 88 in lib/renderer/init.js

@trop trop / Backportable? - 4-0-x

lib/renderer/init.js#L86-L88

Patch Conflict
Raw output
++<<<<<<< b2913e5b7c63dd178bc716ba8a56ae474a51e5d8
 +  if (webviewTag && process.guestInstanceId == null) {
 +    require('@electron/internal/renderer/web-view/web-view')
 +    require('@electron/internal/renderer/web-view/web-view-attributes')
++=======
+   if (webviewTag && guestInstanceId == null) {
+     const { setupWebView } = require('@electron/internal/renderer/web-view/web-view')
+     if (contextIsolation) {
+       v8Util.setHiddenValue(window, 'setup-webview', setupWebView)
+     } else {
+       setupWebView(window)
+     }
++>>>>>>> fix: register webview in main world when using contextIsolation

Check failure on line 88 in lib/renderer/init.js

@trop trop / Backportable? - 4-0-x

lib/renderer/init.js#L86-L88

Patch Conflict
Raw output
++<<<<<<< 80ef11626527b293e214f001a2e97f28cfc56dd1
 +  if (webviewTag && process.guestInstanceId == null) {
 +    require('@electron/internal/renderer/web-view/web-view')
 +    require('@electron/internal/renderer/web-view/web-view-attributes')
++=======
+   if (webviewTag && guestInstanceId == null) {
+     const { setupWebView } = require('@electron/internal/renderer/web-view/web-view')
+     if (contextIsolation) {
+       v8Util.setHiddenValue(window, 'setup-webview', setupWebView)
+     } else {
+       setupWebView(window)
+     }
++>>>>>>> fix: register webview in main world when using contextIsolation
You can’t perform that action at this time.