This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 973
Fixes undefined synopsis for media publishers #12706
Merged
Merged
Conversation
This file contains 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
NejcZdovc
commented
Jan 18, 2018
@@ -2400,7 +2400,7 @@ const onMediaRequest = (state, xhr, type, tabId) => { | |||
if (!cache.isEmpty()) { | |||
const publisherKey = cache.get('publisher') | |||
const publisher = ledgerState.getPublisher(state, publisherKey) | |||
if (!publisher.isEmpty()) { | |||
if (!publisher.isEmpty() && publisher.has('providerName')) { |
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.
This line checks if data is corrupted and if that is the case we don't use cache, but fetch is again
NejcZdovc
commented
Jan 18, 2018
@@ -2449,19 +2449,13 @@ const onMediaPublisher = (state, mediaKey, response, duration, revisited) => { | |||
const publisherURL = response.get('publisherURL') | |||
const providerName = response.get('providerName') | |||
|
|||
if (publisher.isEmpty()) { | |||
revisited = false | |||
if (!synopsis.publishers[publisherKey] || publisher.isEmpty()) { |
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.
We always check for synopsis as well. If synopsis or publisher in the state are missing, we initialize it again, so that we don't have corrupted data.
Codecov Report
@@ Coverage Diff @@
## master #12706 +/- ##
==========================================
+ Coverage 56.2% 56.21% +<.01%
==========================================
Files 278 278
Lines 27137 27133 -4
Branches 4398 4399 +1
==========================================
- Hits 15253 15252 -1
+ Misses 11884 11881 -3
|
Resolves brave#12591 Auditors: Test Plan:
NejcZdovc
force-pushed
the
hotfix/#12591-error
branch
from
January 18, 2018 08:23
d0d74d2
to
b1cc0bc
Compare
bsclifton
approved these changes
Jan 18, 2018
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.
LGTM 😄 👍
bsclifton
added a commit
that referenced
this pull request
Jan 18, 2018
Fixes undefined synopsis for media publishers
bsclifton
added a commit
that referenced
this pull request
Jan 18, 2018
Fixes undefined synopsis for media publishers
bsclifton
added a commit
that referenced
this pull request
Jan 18, 2018
Fixes undefined synopsis for media publishers
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #12591
Auditors:
Test Plan:
Reviewer Checklist:
Tests