You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeout generation with an error if the template generation is taking forever (#1539)
- In template-engine.js, produceContent function, timing out the handlebars template handler if it takes more than a certain amount of time for generation because this can lead to ZAP just hanging forever.
- Also throwing errors when there is no content generated out of a generation template file
- Cleaning up the promises in generateAllTemplates because it was incorrect
Fixing the deferred loading and generation in templates with after clause
- In the after helper, adding it to the global deferred block array
- In template engine adding deferredblock to the context and then later adding it to the content
- Removing the entire global.promises.push(syncPromise) which makes the generation of templates hang. Look at the test case which makes this hang
- Adding tests to make sure templates no longer hang and also noticing substantial improvement in our generation time after this change
- This also allows better usage of promised handlebar helpers where you can now do {{#if promise}} if required
- Github: ZAP#792
0 commit comments