Commit Graph

2397 Commits

Author SHA1 Message Date
Marshall Greenblatt
274abcf792 Fix ExecuteJavaScript failure with null CefRenderProcessHandler (see issue #2421)
When CefApp::GetRenderProcessHandler returned null
CefRenderFrameObserver::DidCreateScriptContext was returning early (not
calling CefFrameImpl::OnContextCreated) and consequently queued actions
such as JavaScript were never executed.
2021-08-18 18:05:18 -04:00
CEF Spotify
9d87c1f976 Update to Chromium version 92.0.4515.159 2021-08-17 15:59:55 +00:00
Marshall Greenblatt
d15cfa853e chrome: Fix AssertBlockingAllowed() with disk-based Profile creation (see issue #2969) 2021-08-04 15:19:32 -04:00
CEF Spotify
4045acff92 Update to Chromium version 92.0.4515.131 2021-08-04 18:46:00 +00:00
Marshall Greenblatt
01c8529f74 views: Fix multiple issues with hide-frame (fixes issue #3168) 2021-08-04 14:20:31 -04:00
Marshall Greenblatt
5ffe90cd56 Fix assertion when client handles HTTPS URL without certificate. 2021-08-04 14:19:27 -04:00
Marshall Greenblatt
a9ec100d85 ceftests: Don't use std::make_unique which requires C++14 2021-07-29 11:53:23 -04:00
Marshall Greenblatt
7cfecf12ac Mac: ceftests: Add missing gtest_teamcity dependency 2021-07-28 13:01:19 -04:00
Marshall Greenblatt
bc6d8f3bee Fix ceftest failures with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled the old RFH tree may be cached instead of being
immediately deleted as a result of main frame navigation. If a RFH is cached
then delivery of the CefFrameHandler::OnFrameDetached callback will be delayed
until the the RFH is ejected from the cache (possibly not occurring until the
browser is destroyed). This change in OnFrameDetached timing was causing
FrameHandlerTest.OrderSubCrossOrigin* to fail, and the inclusion of cached
frames in CefBrowserInfo::GetAllFrames was causing
FrameTest.NestedIframesDiffOrigin to fail.

BackForwardCache is currently being tested via field trials (see
https://crbug.com/1171298) and can be explicitly disabled using the
`--disable-back-forward-cache` or `--disable-features=BackForwardCache`
command-line flags.
2021-07-28 12:23:23 -04:00
Marshall Greenblatt
6bd1124a61 chrome: Linux: Fix ceftest DraggableRegionsTest.DraggableRegions failure (see issue #2969) 2021-07-28 12:23:23 -04:00
Marshall Greenblatt
af1a5c6f6b chrome: Fix potential UAF of ChromeBrowserContext and Profile (see issue #2969) 2021-07-28 12:23:23 -04:00
CEF Spotify
3492b1bd76 Update to Chromium version 92.0.4515.107 2021-07-20 20:08:36 +00:00
CEF Spotify
159e6553a5 Update to Chromium version 92.0.4515.101 2021-07-19 15:40:54 +00:00
CEF Spotify
add734afd4 Update to Chromium version 92.0.4515.81 2021-07-01 16:09:27 +00:00
Marshall Greenblatt
e75b87161d Linux: Fix SchemeHandlerTest.Custom*StandardNoResponse test failures 2021-06-30 12:35:59 -04:00
Marshall Greenblatt
1bed986adb Windows: Fix cef_sandbox.lib unresolved external throw_bad_optional_access
Fixes the following linker error with the official cef_sandbox.lib build:
cef_sandbox.lib(task_queue_selector.obj) : error LNK2001: unresolved external
symbol "void __cdecl absl::optional_internal::throw_bad_optional_access(void)"
(?throw_bad_optional_access@optional_internal@absl@@YAXXZ)
2021-06-30 12:33:32 -04:00
Marshall Greenblatt
439421f195 gtest: Add plugin for TeamCity integration
Automatically report unit tests to the TeamCity server if run within TeamCity.
See tests/gtest/teamcity/README.cef for details.

To test: Set the TEAMCITY_PROJECT_NAME environment variable and run ceftests.
2021-06-29 12:44:09 -04:00
CEF Spotify
108795e566 Update to Chromium version 92.0.4515.70 2021-06-29 01:39:58 +00:00
Matthew Isaacs
847fba0d7f widevine: Add arm64 arch manifest value (see issue #2981) 2021-06-17 10:10:08 -04:00
Marshall Greenblatt
d7c630a930 alloy: Fix link click navigation in PDF files (fixes issue #3143)
This change adds a minimal implementation of the |tabs.update| extension API and
modifies StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent to return a valid
|streamInfo.tabId| value as required by the navigateInCurrentTab implementation
in chrome/browser/resources/pdf/browser_api.js.
2021-06-16 16:06:25 -04:00
Alex Maitland
f6aa203222 Expose certificate error codes to OnLoadError 2021-06-16 12:01:34 -04:00
Marshall Greenblatt
ad7b8d9a08 widevine: Fix VP9 version string for v4.10.2209.0 (fixes issue #3138) 2021-06-14 14:48:56 -04:00
Marshall Greenblatt
2804be0749 Windows: Allow non-component Debug official sandbox builds (see issue #2679) 2021-06-11 20:56:55 -04:00
Marshall Greenblatt
023df80e74 Use Chromium code for cookie date validity check (fixes issue #2927) 2021-06-11 13:43:42 -04:00
Marshall Greenblatt
bfc5648634 Add --disable-request-handling-for-testing option
Add a command-line option to bypass request handling in CEF to faciliate
debugging of network-related issues.
2021-06-11 13:43:35 -04:00
Marshall Greenblatt
052b61ddd9 Windows: Forbid non-component Debug builds (see issue #2679) 2021-06-11 13:43:28 -04:00
Marshall Greenblatt
008ace03fc Update to Chromium version 92.0.4515.51 2021-06-11 11:08:25 -04:00
Marshall Greenblatt
ba46b8c53e Fix CefBrowser::GetMainFrame assumptions in the renderer process (see issue #2421)
ClientAppRenderer::Delegate callbacks are executed for all tests. In this case
CorsTest.IframeAllowScriptsCustomNonStandardSchemeToServer was crashing on Linux
because CefBrowser::GetMainFrame() returns nullptr in the renderer process when
called from a cross-origin sub-frame.
2021-06-10 16:42:45 -04:00
Marshall Greenblatt
9353f9b28b Mac: Fix Xcode 12.5 build errors related to implicit copy assignment operators 2021-06-10 16:42:45 -04:00
Marshall Greenblatt
992479d5a8 Mac: Don't enable dSYMs by default for non-offical builds
Building with dSYMs enabled results in substantially longer link times and
provides minimal benefit for builds that are not intended for distribution.

They can still optionally be enabled by setting enable_dsyms=true via
GN_DEFINES. They remain enabled by default for official builds generated
with is_official_build=true and are required if packaging symbols via the
make_distrib.py script.
2021-06-10 16:42:45 -04:00
Marshall Greenblatt
5a622c22b5 Mac: Fix flaky ResourceRequestHandlerTest failures
The AbortAfterCreated and AbortBeforeBrowse tests were flaking due to a race
between request handling and browser close. The tests would fail if the request
handling completed first.
2021-06-10 16:42:45 -04:00
Marshall Greenblatt
3c0a4410ad Fix crash if a frame is detached before the attach message arrives (see issue #2421)
This reproduced on Mac with ResourceRequestHandlerTest.BasicStandardUnhandledModifyBeforeResourceLoad
2021-06-10 16:42:44 -04:00
Marshall Greenblatt
ecbeca36e7 Mac: Fix compile error due to multiply defined type (see issue #2421) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt
0aad12fe1b Linux: Fix Check failed: generated_timestamp < total_latency_stage.end_time (see issue #3102) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt
00dca9601e Update to Chromium version 92.0.4515.0 (#885287) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt
f2f52c1e2c Fix compile error due to missing include (see issue #2421) 2021-05-31 19:18:33 -04:00
Marshall Greenblatt
f3ddec372f chrome: Fix ResourceRequestHandlerTest failures (see issue #2969) 2021-05-31 18:58:27 -04:00
Marshall Greenblatt
e411b513be Add CefFrameHandler callbacks for tracking CefFrame lifespan (see issue #2421)
See the new cef_frame_handler.h for complete usage documentation.

This change includes the following related enhancements:
- The newly added CefBrowser::IsValid method will return false (in the browser
  process) after CefLifeSpanHandler::OnBeforeClose is called.
- CefBrowser::GetMainFrame will return a valid object (in the browser process)
  until after CefLifeSpanHandler::OnBeforeClose is called.
- The main frame object will change during cross-origin navigation or
  re-navigation after renderer process termination. During that time,
  GetMainFrame will return the new/pending frame (in the browser process) and
  any messages that arrive for the new/pending frame will be correctly
  attributed in OnProcessMessageReceived.
- Commands to be executed in the renderer process that may fail during early
  frame initialization (ExecuteJavaScript, LoadRequest, etc.) will now be
  queued until after the JavaScript context for the frame has been created.
- Logging has been added for any commands that are dropped because they arrived
  after frame detachment.
2021-05-31 18:58:27 -04:00
Marshall Greenblatt
5ddd26e483 Restore support for CreateBrowserSync with NULL |request_context| (see issue #2969)
This was unintentionally lost during the Chrome runtime refactoring effort.
2021-05-20 15:11:39 -04:00
Marshall Greenblatt
21ac0be8d7 Update process message unit test expectations (see issue #3126)
See related comments in commit f3c513ba.
2021-05-20 14:56:23 -04:00
Marshall Greenblatt
f3c513bafd Allow a CefProcessMessage to remain valid after receipt (see issue #3126)
A reference to a received CefProcessMessage object and/or associated argument
list can now be kept outside of the OnProcessMessageReceived callback. The
argument list is no longer explicitly owned by the CefProcessMessage object
and can be individually assigned to other CefValue types as needed (e.g. by
passing to SetList, etc). Depending on client usage this could reduce the
potential for unnecessary copies of the list contents.

Received messages can also be sent back using SendProcessMessage (after which
the CefProcessMessage would become invalid as discussed in issue #3123). This
is not new behavior but we have now added explicit unit test coverage for it.
This also no longer requires a copy of the argument list contents.

Note that a received argument list is initially read-only for logical
consistency. Assignment to another CefValue object could potentially remove
the read-only status because it is not an intrinsic property of the underlying
Chromium data type. This is fine because, at that point, ownership has been
transfered to the new CefValue object and the original logical context (as
part of the CefProcessMessage) no longer applies.
2021-05-20 14:46:19 -04:00
Marshall Greenblatt
ff8f4a7217 Remove the TID_FILE default value
Clients should instead make an informed decision about which blocking thread
to use. See cef_thread_id_t documentation for guidance.
2021-05-19 17:42:51 -04:00
Marshall Greenblatt
d9efaee9b9 Fix routing of frame messages after cross-origin navigation (fixes issue #2849)
When navigating cross-origin a speculative RenderFrameHost (RFH) and
CefFrameHostImpl is created in the browser process for the new frame object
created in a new renderer process. The FrameAttached message then arrives for
the speculative RFH, and as a consequence interfaces are bound between the new
CefFrameHostImpl and the speculative RFH. If the pending navigation commits
then the existing RFH will be replaced with the previously speculative RFH.
Since interfaces are already bound we must keep the new CefFrameHostImpl. This
means that frame objects (including for the main frame) will now always change
after cross-origin navigation, and the old frame object will be invalidated.
2021-05-18 21:59:48 -04:00
Marshall Greenblatt
ebee84755e Convert legacy IPC messages to Mojo (fixes issue #3123)
This change introduces a few minor CEF API behavior changes:

- A CefProcessMessage object cannot be reused after being passed to
  SendProcessMessage.
- The |extra_info| argument to CefRenderProcessHandler::OnBrowserCreated may
  now be NULL.

Where appropriate, we now utilize the default UTF string encoding format and
shared memory to reduce copies and conversions for the cross-process
transfer of arbitrary-length strings. For example, CefFrame::GetSource/GetText
now involves zero UTF conversions and zero copies in the browser process for
the CefString delivered to CefStringVisitor::Visit().
2021-05-18 21:59:48 -04:00
Marshall Greenblatt
4f0b7b4511 chrome: ceftests: Avoid timeouts of ResourceManagerTest.ManyRequests (see issue #2969) 2021-05-18 15:35:42 -04:00
Marshall Greenblatt
fde96be168 Fix crash closing DevTools window (fixes issue #3111) 2021-05-05 12:48:07 -04:00
Marshall Greenblatt
820ef6c323 Fix crash in OnGuestDetached when unloading PDF (fixes issue #3121) 2021-05-04 13:25:25 -04:00
Marshall Greenblatt
2de07250dc Restore async CreateBrowser behavior (fixes issue #3116, fixes issue #3118)
Restore the async CreateBrowser behavior that existed prior to commit 691c9c2
because executing synchronously (for example, from inside OnContextInitialized)
causes issues on MacOS and possibly other platforms.
2021-04-29 17:33:32 -04:00
Marshall Greenblatt
3ab91a45c9 chrome: Support configuration of accept language (see issue #2969)
This change adds support for CEF settings configuration of accept_language_list.
If specified, this value will take precedence over the "intl.accept_languages"
preference which is controlled by chrome://settings/languages.
2021-04-28 13:12:09 -04:00
Marshall Greenblatt
c03a6f4386 chrome: Support configuration of user agent and locale (see issue #2969)
This change adds support for CefSettings and command-line configuration of
user_agent, user_agent_product (formerly product_version) and locale.
2021-04-27 12:39:12 -04:00