perf: omit unnecessary work from ElectronRenderFrameObserver::ShouldNotifyClient()
(#41347)
perf: omit unnecessary work from ElectronRenderFrameObserver::ShouldNotifyClient() - (perf) GetBlinkPreferences() returns a const&, so we can use that reference instead of making a temporary copy - (perf) Don't create url object unless it's needed. - (refactor) Move is_main_world() and is_isolated_world() from the header into an anonymous namespace in the .cc file so they can be inlined and made constexpr
This commit is contained in:
parent
995f3dc120
commit
7cd23a4900
2 changed files with 20 additions and 21 deletions
|
@ -37,10 +37,9 @@ class ElectronRenderFrameObserver : public content::RenderFrameObserver {
|
|||
void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override;
|
||||
|
||||
private:
|
||||
bool ShouldNotifyClient(int world_id);
|
||||
[[nodiscard]] bool ShouldNotifyClient(int world_id) const;
|
||||
|
||||
void CreateIsolatedWorldContext();
|
||||
bool IsMainWorld(int world_id);
|
||||
bool IsIsolatedWorld(int world_id);
|
||||
void OnTakeHeapSnapshot(IPC::PlatformFileForTransit file_handle,
|
||||
const std::string& channel);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue