commit | 40d8e082e3f4f4f2322b9747e64ba434988e56da | [log] [tgz] |
---|---|---|
author | Devlin Cronin <rdevlin.cronin@chromium.org> | Fri Nov 05 21:34:25 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 05 21:34:25 2021 |
tree | c80c6563d2c016df2819a9d7b2eeb1533695bcd6 | |
parent | 8004146c3c418e1ba4d2a2dca29842802e00e05b [diff] |
[Blink] Add promise support to WebLocalFrame::RequestExecuteScript() Add optional promise support to WebLocalFrame::RequestExecuteScript(). When specified, if the executed script evaluates to a single argument of a v8::Promise, then the script executor will wait for the promise to resolve and pass the result of the promise to the WebScriptExecutionCallback. This avoids callers having to handle the Promise-chaining themselves. If a promise rejects, an empty v8::Local<v8::Value> is passed to the callback (matching how we treat errors in scripts). Use the new promise behavior in CommerceHintAgent, which previously manually chain a method onto the returned promise. Bug: 1195807 Change-Id: I07d7e8450d57ccb94cce1cfb1595cc490d90d166 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3230010 Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/main@{#938948}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.