Commit 85dbb93c authored by Hiroki Nakagawa's avatar Hiroki Nakagawa Committed by Commit Bot

ES Modules: Update class level comments on FetchClientSettingsObjectSnapshot

This is a follow-up CL for the preview review comments:
https://chromium-review.googlesource.com/c/chromium/src/+/1090592/4/third_party/blink/renderer/core/script/fetch_client_settings_object_snapshot.h#23

Bug: 845285
Change-Id: I69192292116ee9a5675aeb94cbb4e7381f01f7f7
Reviewed-on: https://chromium-review.googlesource.com/1098654
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarHiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567174}
parent 167d4ccf
......@@ -15,25 +15,21 @@ namespace blink {
class ExecutionContext;
// This is a partial implementation of the "settings object" concept defined in
// the HTML spec.
// "An environment settings object, containing various settings that are shared
// with other scripts in the same context."
// the HTML spec:
// https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
//
// This is used as the "fetch client settings object" on script fetch. For
// example:
// "To fetch a module worker script graph given a url, a fetch client settings
// object, a destination, a credentials mode, and a module map settings object,
// run these steps."
// This is also a partial implementation of the "fetch client settings object"
// used in module script fetch. Actually, it's used with ResourceFetcher and
// FetchContext to compensate "fetch client settings object" that are not
// included in this class.
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree
//
// In the HTML spec, the "settings object" concept is defined as master data of
// the execution context's states, and each spec algorithm takes a reference to
// the master data. On the other hand, this class takes a partial snapshot of
// the execution context's states so that an instance of this class can be
// passed to another thread without cross-thread synchronization. This means the
// instance can be out of sync with the master data. If you need a fresh data,
// you have to create a new instance again.
// This takes a partial snapshot of the execution context's states so that an
// instance of this class can be passed to another thread without cross-thread
// synchronization. Don't keep this object persistently, instead create a new
// instance per each "fetch a module script graph" algorithm:
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-script-tree
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree
class CORE_EXPORT FetchClientSettingsObjectSnapshot final {
public:
explicit FetchClientSettingsObjectSnapshot(ExecutionContext&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment