Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upgrade to Chromium 61 #10213

Merged
merged 128 commits into from
Nov 24, 2017
Merged

[WIP] Upgrade to Chromium 61 #10213

merged 128 commits into from
Nov 24, 2017

Conversation

alexeykuzmin
Copy link
Contributor

@alexeykuzmin alexeykuzmin commented Aug 7, 2017

Current state

This branch depends on libcc from electron/libchromiumcontent#335.

Compilation and linking work on all platforms.
There is a couple of failing and temporary disabled tests.

TODOs

For review

Done

a3438e7 FIXME: DesktopNotificationDelegate has been removed
9a08f42 REVIEW: Reporting: Wire ReportingDelegate into ChromeNetworkDelegate
24dbc39 FIXME: Refactor client cert private key handling. [deepak1556]
44d1fd2 FIXME: Use sk_tool_utils::copy_to() instead of .deepCopyTo().
9b29aa8 REVIEW: Move handling of DraggableRegionsChanged notification from "view" to "frame".
49d2d98 REVIEW: Remove obsolete Blink popup blocker.
1bed73a FIXME: Remove "async" option from menu.popup()
54a6d14 REVIEW: Fix 'constructor cannot be redeclared' error
4f20949 REVIEW: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
ae62ad4 FIXME: Remove corsEnabled option from webFrame.registerURLSchemeAsPrivileged()

Tests

Disabled

Failing

  • modules support > third-party module > ffi > does not crash
  • <webview> tag > loads devtools extensions registered on the parent window
  • BrowserWindow module > extensions and dev tools extensions > works when used with partitions
  • BrowserWindow module > extensions and dev tools extensions > BrowserWindow.addDevToolsExtension > when the devtools is docked> creates the extension
  • BrowserWindow module > extensions and dev tools extensions > BrowserWindow.addDevToolsExtension > when the devtools is undocked > creates the extension
  • BrowserWindow module > nativeWindowOpen option > loads native addons correctly after reload
  • crashReporter module > without sandbox > should send minidump when node processes crash
  • crashReporter module > with sandbox > should send minidump when node processes crash
  • ipc module > remote listeners > detaches listeners subscribed to destroyed renderers, and shows a warning
  • asar package > node api > child_process.fork > opens a normal js file
  • asar package > node api > child_process.fork > supports asar in the forked js
  • asar package > node api > process.env.ELECTRON_NO_ASAR > disables asar support in forked processes
  • asar package > node api > process.env.ELECTRON_NO_ASAR > disables asar support in spawned processes
  • asar package > original-fs module > is available in forked scripts
  • modules support > third-party module > runas > can be required in renderer
  • modules support > third-party module > runas > can be required in node binary
  • node feature > child_process > child_process.fork > * (9 tests)
  • node feature > child_process> child_process.spawn > supports spawning Electron as a node process via the ELECTRON_RUN_AS_NODE env var
  • node feature > net.connect> emit error when connect to a socket path without listeners
  • <webview> tag > nodeintegration attribute > loads native modules when navigation happens

@vulture
Copy link
Contributor

vulture commented Aug 10, 2017

I know this is still a WIP, so nbd if you'd rather I just wait, but I was hoping to get a jump on the latest version for testing etc. I noticed a couple issues with this branch currently:

@alexeykuzmin
Copy link
Contributor Author

alexeykuzmin commented Aug 10, 2017

@vulture Yes, it is WIP and it's going to stay WIP for some time, probably weeks.
Right now it's in a quite messed up state, it's basically just a set of compilation fixes and it cannot be built.

I personally don't recommend to try to use it (even for testing) until the Chromium 61 is released, which is scheduled on September 5th.

// script to run while `window.location` is still "about:blank".
blink::WebDocument document = frame->GetDocument();
blink::WebElement html_element = document.DocumentElement();
if (html_element.IsNull()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zcbenz It's Ch61 upgrade related so not very urgent.

Is this check equivalent to to that you did in 0bcc9b7?
DidCreateDocumentElement() method was removed from content::RenderViewObserver
(it is still present in content::RenderFrameObserver).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it should be the same, Chromium is in the process of deprecating RenderViewObserver for RenderFrameObserver, so eventually we should migrate code of atom_render_view_observer.cc to use atom_render_frame_observer.cc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks.

@alexeykuzmin alexeykuzmin force-pushed the upgrade-to-chromium-59 branch 11 times, most recently from baa3c0d to 5543bfc Compare August 16, 2017 11:29
@tonyganch tonyganch changed the base branch from upgrade-to-chromium-59 to master August 16, 2017 14:33
@@ -144,7 +144,7 @@ class PdfViewerUI::ResourceRequester

std::unique_ptr<content::ResourceHandler> handler =
base::MakeUnique<content::StreamResourceHandler>(
request.get(), stream_context->registry(), origin);
request.get(), stream_context->registry(), origin, false);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a review.

@CapOM
Copy link
Contributor

CapOM commented Sep 14, 2017

Hi is there a way to try electron with chromium 61 using npm install electron@1.X.0 ?

I would like to try ES6 support, so far it fails for:

<script type="module" id="test"></script> <script type="module">import * from "test"</script>

=> "Uncaught SyntaxError: Unexpected token import"

I am using electron 1.8.0 with "webPreferences: {blinkFeatures: ModuleScripts"} passed to new BrowserWindow.

@MarshallOfSound
Copy link
Member

Hi is there a way to try electron with chromium 61 using npm install electron@1.X.0 ?

Not currently, the upgrade is still a WIP

@alexeykuzmin
Copy link
Contributor Author

@MarshallOfSound
Oh, hi Sam! So many thanks for helping us with the upgrade )

@MarshallOfSound
Copy link
Member

@alexeykuzmin Haha, fixed a few issues on Windows still a weird "cannot use __try on objects that require unwinding" error that I looked into but couldn't figure out the change that broke the code 🤔

@vulture
Copy link
Contributor

vulture commented Sep 22, 2017

@MarshallOfSound simplified version: you cant mix __try and C++ implicit object destructors basically... , like e.g. using a std::string inside a __try will trigger that error.

a simple fix is to put C++ object usage inside a separate function, then __try { callfunction(); } __except(....)

@zcbenz
Copy link
Contributor

zcbenz commented Nov 24, 2017

I'm rebasing this PR to fix the conflicts introduced by the mips changes. The build state is not supposed to change.

@zcbenz
Copy link
Contributor

zcbenz commented Nov 24, 2017

I'm turning on the just-added 2xlarge resource class for the arm CI jobs, which should be able to fix the failing arm release build.

@codebytere codebytere merged commit c18afc9 into master Nov 24, 2017
@codebytere codebytere deleted the upgrade-to-chromium-61 branch November 24, 2017 09:17
@alexeykuzmin
Copy link
Contributor Author

I'll create tasks to fix and enable disabled tests right after this PR is merged.

Here they are: #11242, #11243, #11244, #11245, #11246

@SatoshiKawabata
Copy link

@alexeykuzmin When will this be included to beta?

@alexeykuzmin
Copy link
Contributor Author

@SatoshiKawabata when the team is ready to release a beta. No dates, sorry.

@SatoshiKawabata
Copy link

@alexeykuzmin OK. I'm looking forward to this. Thanks.

@SatoshiKawabata
Copy link

@alexeykuzmin Does v1.8.2-beta.3 include this PR?

@HitomiTenshi
Copy link

HitomiTenshi commented Dec 5, 2017

@SatoshiKawabata no, you can see it's still Chrome 59 when you open the dev tools.

electron_2017-12-05_11-24-14

You'll also have to wait for #10836 to get sorted out. Patience my man.
The new Electron version with Chrome 61 will probably get released as 1.9.x because of the Chrome and Node JS upgrades.

@alexeykuzmin
Copy link
Contributor Author

@SatoshiKawabata No, it doesn't. Versions 1.8.x are based on Chromium 59.

@SatoshiKawabata
Copy link

I see. Patience! Thanks.

@karelbilek
Copy link

Hello. Just for information. Does Electron 1.9.X with Chrome 61 support webusb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.