Skip to content
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

Set empty active tab if origin is invalid #8890

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 2, 2020

The activeTab state is now set to an empty object if the origin of the active tab is missing or invalid. It can be invalid if the URL
passed to the URL constructor is missing a scheme (e.g. about:blank).

There are currently no cases where the rest of the data in activeTab is useful in the absence of an origin. This will make upcoming UI logic changes a bit simpler than they would be otherwise. Now we can assume that if any property is set on activeTab, it must have a valid origin.

The `activeTab` state is now set to an empty object if the `origin` of
the active tab is missing or invalid. It can be invalid if the URL
passed to the `URL` constructor is missing a scheme (e.g.
`about: blank`).

There are currently no cases where the rest of the data in `activeTab`
is useful in the absence of an `origin`. This will make upcoming UI
logic changes a bit simpler than they would be otherwise. Now we can
assume that if any property is set on `activeTab`, it must have a valid
`origin`.
@metamaskbot
Copy link
Collaborator

Builds ready [8c3a978]
Page Load Metrics (590 ± 46 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint298341178
domContentLoaded3507365889545
load3517385909546
domInteractive3507365889545

@Gudahtt Gudahtt marked this pull request as ready for review July 2, 2020 20:40
@Gudahtt Gudahtt requested a review from a team as a code owner July 2, 2020 20:40
@Gudahtt Gudahtt merged commit a294ca7 into develop Jul 2, 2020
@Gudahtt Gudahtt deleted the set-empty-active-tab-if-no-valid-origin branch July 2, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants