-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Fixes WeakMap polyfill (and improves PDFWorker port check). #8522
Conversation
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://54.67.70.0:8877/1bc3f4f2940a38f/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/1bc3f4f2940a38f/output.txt Total script time: 2.18 mins Published |
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @yurydelendik received. Current queue size: 0 Live output at: http://54.67.70.0:8877/7edf8e9d8d1a39d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @yurydelendik received. Current queue size: 0 Live output at: http://54.215.176.217:8877/eda74b7cb882481/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/7edf8e9d8d1a39d/output.txt Total script time: 2.36 mins
|
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.
Looks good to me, thank you!
src/shared/compatibility.js
Outdated
@@ -1176,10 +1176,13 @@ PDFJS.compatibilityChecked = true; | |||
} | |||
WeakMap.prototype = { | |||
has(obj) { | |||
if (typeof obj !== 'object' || obj === null) { |
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.
Unless I'm misunderstanding the examples at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap#Examples, it appears that it should also work if obj
is of type function
.
So, do we need to add a typeof obj !== 'function'
check as well here?
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/eda74b7cb882481/output.txt Total script time: 11.68 mins
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://54.67.70.0:8877/8a6501fafbd1f0e/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/8a6501fafbd1f0e/output.txt Total script time: 2.21 mins Published |
Fixes WeakMap polyfill (and improves PDFWorker port check).
Regressed on IE9 after #8508 -- WeakMap polyfill did not work per spec.