-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Convert the PDFPageProxy.intentStates
property from an Object
to a Map
#12017
Convert the PDFPageProxy.intentStates
property from an Object
to a Map
#12017
Conversation
…g iterated (PR 11985 follow-up) In hindsight, using the `for (let [key, value] of myMap) { ... }`-format when we don't care about the `key` probably wasn't such a great idea. Since `Map`s have explicit support for iterating either `key`s or `value`s, we should probably use that instead here.
…DFPageProxy._destroy` This patch aims to simplify the `PDFPageProxy._destroy` method, by: - Replacing the unnecessary `forEach` with a "regular" `for`-loop instead. - Use a more appropriate variable name, since `intentState.renderTasks` contain instances of `InternalRenderTask`. - Move the "is rendering completed"-handling to a new `InternalRenderTask.completed` getter, to abstract away some (mostly) internal `InternalRenderTask` state.
…a `Map` As can be seen in the code there's a handful of places where this structure needs to be iterated, something that becomes cumbersome when dealing with `Object`s. Hence, by changing this to a `Map` instead we can both simplify the code and avoid creating unnecessary closures. Particularily the `PDFPageProxy._tryCleanup` method becomes a lot more readable, at least in my opinion. Finally, since this property is intended to be "private" the name is adjusted to reflect that.
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a3ae0f16957305d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/4048edf4cb9e2d5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/a3ae0f16957305d/output.txt Total script time: 3.78 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/4048edf4cb9e2d5/output.txt Total script time: 4.82 mins
|
Looks better to me too. Thanks! |
Please refer to the individual commit messages for additional details.