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

WIP: remove pdf.js #2128

Closed
wants to merge 1 commit into from
Closed

WIP: remove pdf.js #2128

wants to merge 1 commit into from

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Apr 1, 2019

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security) on
    • Windows
    • macOS
    • Linux
  • Verified that all lint errors/warnings are resolved (npm run lint)
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@bsclifton bsclifton force-pushed the bsc-remove-pdfjs branch 2 times, most recently from d937140 to 5ccf0ba Compare April 8, 2019 18:00
@bsclifton
Copy link
Member Author

bsclifton commented Apr 8, 2019

Still working through this one... Here's where I'm at:

  • PDF.js is removed (see changes for this PR)
  • Chromium PDF Viewer was removed from blacklist and added to whitelist (including the vendor/whitelist component)
  • Chromium PDF Viewer shows up in brave://extensions and IPC events like OnLoaded are dispatched for it (mhjfbmdgcfjbbpaeojofohoefgiehjai) on startup
  • Using File => Open and choosing a simple PDF completely hangs.
  • If you open the debug tools and use network inspector (under timing, trying to open a PDF shows this:
    (note: it never finishes; Content Download never happens)
    image
  • If you open a PDF document in Chromium for example, it works and you'll see this in network inspector:
    Screen Shot 2019-04-08 at 4 49 45 PM
  • Per @iefremov 's request, I tried loading PDF while recording results using brave://net-export/
    file:///Users/clifton/Desktop/pdf.pdf
    Start Time: 2019-04-02 23:23:11.133
    
    t=10433 [st= 0] +REQUEST_ALIVE  [dt=52]
                     --> priority = "HIGHEST"
                     --> url = "file:///Users/clifton/Desktop/pdf.pdf"
    t=10433 [st= 0]    NETWORK_DELEGATE_BEFORE_URL_REQUEST  [dt=1]
    t=10434 [st= 1]    URL_REQUEST_START_JOB  [dt=0]
                       --> load_flags = 9216 (MAIN_FRAME_DEPRECATED | MAYBE_USER_GESTURE)
                       --> method = "GET"
                       --> privacy_mode = 0
                       --> url = "file:///Users/clifton/Desktop/pdf.pdf"
    t=10435 [st= 2]   +URL_REQUEST_DELEGATE_RESPONSE_STARTED  [dt=45]
    t=10435 [st= 2]      DELEGATE_INFO  [dt=0]
                        --> delegate_blocked_by = "MimeSniffingResourceHandler"
    t=10436 [st= 3]      DELEGATE_INFO  [dt=43]
                        --> delegate_blocked_by = "MojoAsyncResourceHandler"
    
    • Code related to this can be found here
    • The above code is triggered when the file is loaded. It loads the plugins async and then continues to read/buffer the file content after that is complete. The mime type is properly set to application/pdf and this code detects that; MaybeStartInterception then returns true, because handled_by_plugin is true

Will continue to look into this tomorrow...

@simonhong
Copy link
Member

simonhong commented Apr 17, 2019

Still debugging with this branch(https://github.com/brave/brave-core/tree/enable_pdfium - rebased this pr on c74)
When clicks the pdf link, navigation is finished and then enters loading phase.
But it doesn't make any loading progress.
Need to find the reason why it can't make progress after entering loading phase.

WebContentsImpl::DidStopLoading() is not called after clicking pdf document link.
(In chromium, it is called and then pdfium extension viewer url is used as a next navigation)

Below is navigation tracing log from chromium and brave.
brave_navigation_tracing.json.gz
chromium_navigation_tracing.json.gz
According to the above log, brave failed with first loading on renderer and webcontents stays in loading status forever. Renderer has RenderFrameImpl::didFailProvisionalLoad with error code -3.

// An operation was aborted (due to user action).
NET_ERROR(ABORTED, -3)

Why this provisional load failed?? user action? Who abort?

Regarding to --> delegate_blocked_by = "MojoAsyncResourceHandler" log from brave://net-export/, pure chromium(network service disabled) also has this log because of below.

    if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
      // TODO(arthursonzogni): This is a temporary option. Remove this as soon
      // as the InterceptingResourceHandler is removed.
      // See https://crbug.com/791049.
      options |= network::mojom::kURLLoadOptionPauseOnResponseStarted;
    }
  if (url_loader_options_ &
      network::mojom::kURLLoadOptionPauseOnResponseStarted) {
    did_defer_on_response_started_ = true;
    DCHECK(!has_controller());
    request()->LogBlockedBy("MojoAsyncResourceHandler");
    HoldController(std::move(controller));
    return;
  }

Regarding to --> delegate_blocked_by = "MimeSniffingResourceHandler", I didn't see this blocking. But, I think this would be unblocked soon by MimeSniffingResourceHandler::OnPluginsLoaded() callback.

@simonhong
Copy link
Member

simonhong commented Apr 23, 2019

Below is chrome://net-export logs from brave and pure chromium when clicking pdf document link.
In brave log, stream request header has below header value that chromium header doesn't have. The value of Range in header seems invalid.

Range: bytes=1318020-1318020
If-Range: "5349f-2b4c0d-3c8cb72e"

Also, there is no -REQUEST_ALIVE in brave log. It is logged in dtor of URLRequest object. Isn't it destroyed properly? If so, something blocks it?

  • Brave log
t=2346 [st=   1]   +URL_REQUEST_START_JOB  [dt=594]
                    --> load_flags = 9216 (MAIN_FRAME_DEPRECATED | MAYBE_USER_GESTURE)
                    --> method = "GET"
                    --> privacy_mode = 0
                    --> url = "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf"
t=2346 [st=   1]      NETWORK_DELEGATE_BEFORE_START_TRANSACTION  [dt=0]
t=2347 [st=   2]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=2347 [st=   2]      HTTP_CACHE_OPEN_ENTRY  [dt=4]
t=2351 [st=   6]      HTTP_CACHE_ADD_TO_ENTRY  [dt=2]
t=2353 [st=   8]      HTTP_CACHE_READ_INFO  [dt=2]
t=2355 [st=  10]     +HTTP_STREAM_REQUEST  [dt=289]
t=2355 [st=  10]        HTTP_STREAM_JOB_CONTROLLER_BOUND
                        --> source_dependency = 561 (HTTP_STREAM_JOB_CONTROLLER)
t=2644 [st= 299]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                        --> source_dependency = 562 (HTTP_STREAM_JOB)
t=2644 [st= 299]     -HTTP_STREAM_REQUEST
t=2644 [st= 299]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=1]
t=2644 [st= 299]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                        --> GET /cours/IHM/GTK/GGAD.pdf HTTP/1.1
                            Host: devernay.free.fr
                            Connection: keep-alive
                            Upgrade-Insecure-Requests: 1
                            User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.61 Safari/537.36
                            Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
                            Referer: https://www.google.com/
                            Accept-Encoding: gzip, deflate
                            Accept-Language: en-US,en;q=0.9,ko;q=0.8
                            Range: bytes=1318020-1318020
                            If-Range: "5349f-2b4c0d-3c8cb72e"
t=2645 [st= 300]     -HTTP_TRANSACTION_SEND_REQUEST
t=2645 [st= 300]     +HTTP_TRANSACTION_READ_HEADERS  [dt=293]
t=2645 [st= 300]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=293]
t=2938 [st= 593]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                        --> HTTP/1.1 206 Partial Content
                            Date: Mon, 22 Apr 2019 02:39:14 GMT
                            Server: Apache/ProXad [Jul 22 2015 14:50:04]
                            Last-Modified: Mon, 11 Mar 2002 13:54:54 GMT
                            ETag: "5349f-2b4c0d-3c8cb72e"
                            Connection: close
                            Accept-Ranges: bytes
                            Content-Length: 1
                            Content-Range: bytes 1318020-1318020/2837517
                            Content-Type: application/pdf
t=2938 [st= 593]     -HTTP_TRANSACTION_READ_HEADERS
t=2938 [st= 593]      HTTP_CACHE_WRITE_INFO  [dt=1]
t=2939 [st= 594]      NETWORK_DELEGATE_HEADERS_RECEIVED  [dt=0]
t=2940 [st= 595]   -URL_REQUEST_START_JOB
t=2940 [st= 595]   +URL_REQUEST_DELEGATE_RESPONSE_STARTED  [dt=6]
  • Chromium log
t=  54 [st=   0] +REQUEST_ALIVE  [dt=3870]
                  --> priority = "HIGHEST"
                  --> url = "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf"
t=  55 [st=   1]    NETWORK_DELEGATE_BEFORE_URL_REQUEST  [dt=0]
t=  56 [st=   2]   +URL_REQUEST_START_JOB  [dt=647]
                    --> load_flags = 9216 (MAIN_FRAME_DEPRECATED | MAYBE_USER_GESTURE)
                    --> method = "GET"
                    --> privacy_mode = 0
                    --> url = "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf"
t=  56 [st=   2]      NETWORK_DELEGATE_BEFORE_START_TRANSACTION  [dt=0]
t=  56 [st=   2]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=  56 [st=   2]      HTTP_CACHE_OPEN_OR_CREATE_ENTRY  [dt=3]
t=  59 [st=   5]      HTTP_CACHE_ADD_TO_ENTRY  [dt=4]
t=  63 [st=   9]     +HTTP_STREAM_REQUEST  [dt=289]
t=  63 [st=   9]        HTTP_STREAM_JOB_CONTROLLER_BOUND
                        --> source_dependency = 576 (HTTP_STREAM_JOB_CONTROLLER)
t= 352 [st= 298]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                        --> source_dependency = 577 (HTTP_STREAM_JOB)
t= 352 [st= 298]     -HTTP_STREAM_REQUEST
t= 352 [st= 298]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=1]
t= 353 [st= 299]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                        --> GET /cours/IHM/GTK/GGAD.pdf HTTP/1.1
                            Host: devernay.free.fr
                            Connection: keep-alive
                            Upgrade-Insecure-Requests: 1
                            User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3769.0 Safari/537.36
                            Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
                            Referer: https://www.google.com/
                            Accept-Encoding: gzip, deflate
                            Accept-Language: en-US,en;q=0.9
t= 353 [st= 299]     -HTTP_TRANSACTION_SEND_REQUEST
t= 353 [st= 299]     +HTTP_TRANSACTION_READ_HEADERS  [dt=349]
t= 353 [st= 299]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=349]
t= 702 [st= 648]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                        --> HTTP/1.1 200 OK
                            Date: Tue, 23 Apr 2019 03:37:22 GMT
                            Server: Apache/ProXad [Jul 22 2015 14:50:04]
                            Last-Modified: Mon, 11 Mar 2002 13:54:54 GMT
                            ETag: "5349f-2b4c0d-3c8cb72e"
                            Connection: close
                            Accept-Ranges: bytes
                            Content-Length: 2837517
                            Content-Type: application/pdf
t= 702 [st= 648]     -HTTP_TRANSACTION_READ_HEADERS
t= 702 [st= 648]      HTTP_CACHE_WRITE_INFO  [dt=0]
t= 702 [st= 648]      HTTP_CACHE_WRITE_DATA  [dt=1]
t= 703 [st= 649]      HTTP_CACHE_WRITE_INFO  [dt=0]
t= 703 [st= 649]      NETWORK_DELEGATE_HEADERS_RECEIVED  [dt=0]
t= 703 [st= 649]   -URL_REQUEST_START_JOB

@simonhong
Copy link
Member

simonhong commented Apr 23, 2019

After clearing disk cache, I confirmed that same request header is set(same as chromium) and header response seems valid. Invalid request header is set when that is not the first request since disk cache is cleared. I think un-finished URLRequest (that is lack of -REQUEST_ALIVE in the log) causes this invalid request header because writing to disk cache can't be completed as well. Need to find why URLRequest is not destroyed. Because of this, I think http stream request is issued every time (it means disk cache doesn't have proper contents) and next navigation to extension url is blocked.

ResourceLoader owns URLRequest.
ResponseCompleted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf is not called. That means ResourceLoader can't complete document loading for navigation. When this should be completed?

This is brave log from ResourceLoader when clicks pdf link and no more logs.

[6936:10136:0424/161648.395:VERBOSE1:resource_loader.cc(464)] OnResponseStarted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf
[6936:10136:0424/161648.403:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.404:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.405:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.406:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.409:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.410:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.412:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.413:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.413:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[6936:10136:0424/161648.414:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
...

[6936:10136:0424/161648.419:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768

When closes the browser, below log is written.

[6936:10136:0424/161729.949:VERBOSE1:resource_loader.cc(638)] CancelRequestInternal: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf
[6936:10136:0424/161729.958:VERBOSE1:resource_loader.cc(478)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = -3
[6936:10136:0424/161729.958:VERBOSE1:resource_loader.cc(816)] ResponseCompleted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf

Below is chromium's log from ResourceLoader for same page loading.
Before ResponseCompleted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf is called, extension page is started and loaded. During the extension page loading, many OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768 were written and completed with extension page loading. Why brave can't start extension page and who do that?

[13928:16820:0424/154457.976:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf
[13928:16820:0424/154458.011:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154458.011:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
...
[13928:16820:0424/154458.035:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154458.036:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154458.217:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html
[13928:16820:0424/154458.230:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html" bytes_read = 2147
[13928:16820:0424/154458.231:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html" bytes_read = 0
[13928:16820:0424/154458.231:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html
[13928:16820:0424/154458.707:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: chrome://resources/polymer/v1_0/html-imports/html-imports.min.js
[13928:16820:0424/154458.709:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome://resources/polymer/v1_0/html-imports/html-imports.min.js" bytes_read = 8519
[13928:16820:0424/154458.709:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome://resources/polymer/v1_0/html-imports/html-imports.min.js" bytes_read = 0
[13928:16820:0424/154458.709:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: chrome://resources/polymer/v1_0/html-imports/html-imports.min.js
[13928:16820:0424/154458.714:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-error-screen/viewer-error-screen.html
[13928:16820:0424/154458.717:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-error-screen/viewer-error-screen.html" bytes_read = 961
[13928:16820:0424/154458.717:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-error-screen/viewer-error-screen.html" bytes_read = 0
[13928:16820:0424/154458.717:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-error-screen/viewer-error-screen.html
[13928:16820:0424/154458.719:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-page-indicator/viewer-page-indicator.html
[13928:16820:0424/154458.723:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/elements/viewer-page-indicator/viewer-page-indicator.html" bytes_read = 1235

...

[13928:16820:0424/154500.664:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.665:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.665:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.665:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.666:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.666:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.667:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.667:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.671:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.678:VERBOSE1:resource_loader.cc(459)] OnResponseStarted: chrome://resources/roboto/roboto-medium.woff2
[13928:16820:0424/154500.679:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome://resources/roboto/roboto-medium.woff2" bytes_read = 32768
[13928:16820:0424/154500.679:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome://resources/roboto/roboto-medium.woff2" bytes_read = 31028
[13928:16820:0424/154500.679:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "chrome://resources/roboto/roboto-medium.woff2" bytes_read = 0
[13928:16820:0424/154500.680:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: chrome://resources/roboto/roboto-medium.woff2
[13928:16820:0424/154500.720:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.720:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.929:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.929:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.930:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.935:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.937:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.938:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.945:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.953:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.953:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.953:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.954:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.954:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.955:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.955:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.956:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.956:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.957:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.957:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.957:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.958:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.958:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.958:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.959:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.959:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.959:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.960:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.960:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.961:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.965:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.966:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.966:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.967:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.969:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.969:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.970:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.970:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.971:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 32768
[13928:16820:0424/154500.971:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.971:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 19469
[13928:16820:0424/154500.972:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf" bytes_read = 0
[13928:16820:0424/154500.972:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: http://devernay.free.fr/cours/IHM/GTK/GGAD.pdf
[13928:16820:0424/154500.972:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154500.973:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 32768
[13928:16820:0424/154501.000:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 19469
[13928:16820:0424/154501.000:VERBOSE1:resource_loader.cc(473)] OnReadCompleted: "blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b" bytes_read = 0
[13928:16820:0424/154501.000:VERBOSE1:resource_loader.cc(811)] ResponseCompleted: blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/5dddbe9e-fe14-4fb5-b45a-ed1a36c9cb5b

@simonhong
Copy link
Member

Found the cause.
So far, we've used different set of available plugin list at the same time.
For example, when MimeSniffingResourceHandler checks whether available plugin is exists for response, PluginService::GetPluginInfo is used. and available plugin list is filtered by ChromePluginServiceFilter::IsPluginAvailable().
However, when we get plugin list by BravePluginRegistryImpl::GetPlugins(), only flash plugin can be available because we use customized filter(BravePluginRegistryImpl::GetPluginsComplete()) instead of ChromePluginServiceFilter::IsPluginAvailable(). Because of this, we can get different set of available plugin list at the same time.

@simonhong
Copy link
Member

#2342 will handle instead of this for deleting pdf.js

@simonhong simonhong closed this Apr 25, 2019
@simonhong simonhong mentioned this pull request Apr 25, 2019
28 tasks
@bsclifton bsclifton deleted the bsc-remove-pdfjs branch September 12, 2019 20: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.

2 participants