@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use "getInlines()", not "_inlines", to access inlines on client Changeset objects

Summary:
See PHI1898. An install is reporting an execution/initialization order issue where this code is reachable before `_inlines` is initialized.

I can't immediately reproduce it, but using "getInlines()" is preferable anyway and seems likely to fix the problem.

Test Plan: Viewed revisions with inlines, added/removed/edited/replied to inlines, didn't find anything broken.

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

+21 -20
+11 -11
resources/celerity/map.php
··· 13 13 'core.pkg.js' => 'adc34883', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => '5c459f92', 16 - 'differential.pkg.js' => '218fda21', 16 + 'differential.pkg.js' => '5080baf4', 17 17 'diffusion.pkg.css' => '42c75c37', 18 18 'diffusion.pkg.js' => '8ee48a4b', 19 19 'maniphest.pkg.css' => '35995d6d', ··· 383 383 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be', 384 384 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9', 385 385 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 386 - 'rsrc/js/application/diff/DiffChangeset.js' => '39dcf2c3', 386 + 'rsrc/js/application/diff/DiffChangeset.js' => '3b6e1fde', 387 387 'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5', 388 388 'rsrc/js/application/diff/DiffInline.js' => '511a1315', 389 389 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', ··· 784 784 'phabricator-darklog' => '3b869402', 785 785 'phabricator-darkmessage' => '26cd4b73', 786 786 'phabricator-dashboard-css' => '5a205b9d', 787 - 'phabricator-diff-changeset' => '39dcf2c3', 787 + 'phabricator-diff-changeset' => '3b6e1fde', 788 788 'phabricator-diff-changeset-list' => 'cc2c5de5', 789 789 'phabricator-diff-inline' => '511a1315', 790 790 'phabricator-diff-path-view' => '8207abf9', ··· 1229 1229 'trigger-rule', 1230 1230 'trigger-rule-type', 1231 1231 ), 1232 - '39dcf2c3' => array( 1232 + '3ae89b20' => array( 1233 + 'phui-workcard-view-css', 1234 + ), 1235 + '3b4899b0' => array( 1236 + 'javelin-behavior', 1237 + 'phabricator-prefab', 1238 + ), 1239 + '3b6e1fde' => array( 1233 1240 'javelin-dom', 1234 1241 'javelin-util', 1235 1242 'javelin-stratcom', ··· 1242 1249 'phabricator-diff-path-view', 1243 1250 'phuix-button-view', 1244 1251 'javelin-external-editor-link-engine', 1245 - ), 1246 - '3ae89b20' => array( 1247 - 'phui-workcard-view-css', 1248 - ), 1249 - '3b4899b0' => array( 1250 - 'javelin-behavior', 1251 - 'phabricator-prefab', 1252 1252 ), 1253 1253 '3be6ef4f' => array( 1254 1254 'javelin-behavior',
+10 -9
webroot/rsrc/js/application/diff/DiffChangeset.js
··· 723 723 var data = JX.Stratcom.getData(node); 724 724 725 725 if (!data.inline) { 726 - var inline = new JX.DiffInline() 727 - .setChangeset(this) 728 - .bindToRow(node); 729 - 730 - this._inlines.push(inline); 726 + var inline = this._newInlineForRow(node); 727 + this.getInlines().push(inline); 731 728 } 732 729 733 730 return data.inline; 731 + }, 732 + 733 + _newInlineForRow: function(node) { 734 + return new JX.DiffInline() 735 + .setChangeset(this) 736 + .bindToRow(node); 734 737 }, 735 738 736 739 newInlineForRange: function(origin, target, options) { ··· 770 773 .setChangeset(this) 771 774 .bindToRange(data); 772 775 773 - this._inlines.push(inline); 776 + this.getInlines().push(inline); 774 777 775 778 inline.create(); 776 779 ··· 855 858 continue; 856 859 } 857 860 858 - // As a side effect, this builds any missing inline objects and adds 859 - // them to this Changeset's list of inlines. 860 - this.getInlineForRow(row); 861 + this._inlines.push(this._newInlineForRow(row)); 861 862 } 862 863 }, 863 864