Repository navigation
feat(runtime): controls for the HTTP module cache #620
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
defda54
refactor(runtime): fetch synchronous-fallback modules through the loa…
edusperoni 1f00b4c
feat(runtime): switch and clear the HTTP module cache
edusperoni c0c5b81
feat(runtime): honour Clear-Site-Data on HTTP module responses
edusperoni 9743764
feat(inspector): Network.setCacheDisabled and clearBrowserCache contr…
edusperoni c051f69
feat(runtime): bound the HTTP module cache to the most recently used …
edusperoni 7c5df0c
fix(inspector): leave the module cache alone for unknown worker sessions
edusperoni ecf7487
perf(runtime): give the synchronous fallback its own sessions over th…
edusperoni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Malformed root-session
setCacheDisabledcan get a success reply when a JS Network handler is registered.For a root session,
Network.setCacheDisabledwith a non-booleancacheDisabledleaves the cache unchanged. When a JS Network handler is registered, dispatch calls that handler and returns on success. The nativeInvalid parametersreply then never runs. With the no-opsetCacheDisabledhandler inAppWithModules/app/vendor.js, the client can receive a success reply for a request that was ignored. Without a handler, the same request gets-32602.Reject the malformed value before dispatch, as the worker branch already does:
Suggested fix
return; } + if (!valid) { + if (msgId >= 0) { + json reply = {{"id", msgId}, + {"error", {{"code", -32602}, {"message", "Invalid parameters"}}}}; + this->SendRawToConnection(connectionId, reply.dump()); + } + return; + } }