Homec4science

Fully fix a bad rule object aliasing issue custom remarkup rules

Authored by epriestley <git@epriestley.com> on Mar 28 2016, 19:20.

Description

Fully fix a bad rule object aliasing issue custom remarkup rules

Summary:
Fixes T10234. This is a more thorough fix.

Root issue is that some time around D13589, we started hitting an object cache for loadCustomInlineRules(), but didn't adjust the code to account for that.

So if a page created multiple similar engines, we'd return the same $rule object for multiple engines, call setEngine() on it with different engines, and then possibly try to render using an already-expired engine the second time through.

Instead, create a separate $rule object for each separate $engine.

Test Plan:
Repro is something like this:

  • Create a custominlinerule which uses an engine.
  • Purge the remarkup cache.
  • Load a page which uses the rule in two engines (e.g., in a revision description, and also in an inline comment).
  • Before change: second one could fatal. After change: clean load.

Reviewers: thoughtpolice, chad

Reviewed By: thoughtpolice, chad

Subscribers: thoughtpolice, eadler

Maniphest Tasks: T10234

Differential Revision: https://secure.phabricator.com/D15535

Details

Committed
epriestley <git@epriestley.com>Mar 28 2016, 20:27
Pushed
aubortJan 31 2017, 17:16
Parents
rPHda1ebac8d8fa: Allow Nuance items to provide curtain panels, link to imported tasks, parse…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHbf3879b1c72f: Fully fix a bad rule object aliasing issue custom remarkup rules (authored by epriestley <git@epriestley.com>).Mar 28 2016, 20:27