This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Commit 6e00b13
committed
Fix #7442: make API consistent between PrefMan and Prefixed PrefMan.
The slightly higher level API provided by PreferencesManager (over the
PreferencesBase.PreferencesSystem) worked nicely but was inconsistent
with the API an extension author gets when they call
`PreferencesManager.getExtensionPrefs`. This change pushes that extra
behavior down into PreferencesBase.PreferencesSystem so that the
APIs are consistent.
This is a non-breaking change that basically adds to the API:
* doNotSave flag for set: calls to `set()` save automatically unless this flag is set. If extension code is already calling `save()`, that means that there will be an extra call to `save()`, but that should have minimal performance impact because `save()` does no saving when the scopes aren't dirty
* support for string contexts: extensions would have to use complete object contexts previously. This adds support for the simpler string contexts and doesn't change the behavior for object contexts.1 parent ff87510 commit 6e00b13
3 files changed
Lines changed: 81 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
931 | 933 | | |
932 | | - | |
933 | | - | |
| 934 | + | |
| 935 | + | |
934 | 936 | | |
935 | 937 | | |
936 | 938 | | |
| |||
1035 | 1037 | | |
1036 | 1038 | | |
1037 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1038 | 1045 | | |
1039 | | - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1040 | 1049 | | |
1041 | 1050 | | |
1042 | 1051 | | |
| |||
1339 | 1348 | | |
1340 | 1349 | | |
1341 | 1350 | | |
1342 | | - | |
1343 | | - | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1344 | 1358 | | |
1345 | 1359 | | |
1346 | 1360 | | |
| |||
1485 | 1499 | | |
1486 | 1500 | | |
1487 | 1501 | | |
| 1502 | + | |
1488 | 1503 | | |
1489 | 1504 | | |
1490 | 1505 | | |
1491 | | - | |
| 1506 | + | |
1492 | 1507 | | |
1493 | 1508 | | |
1494 | 1509 | | |
| |||
1525 | 1540 | | |
1526 | 1541 | | |
1527 | 1542 | | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1528 | 1546 | | |
1529 | 1547 | | |
1530 | 1548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
| 450 | + | |
449 | 451 | | |
450 | 452 | | |
451 | 453 | | |
| |||
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | 468 | | |
511 | 469 | | |
512 | 470 | | |
| |||
541 | 499 | | |
542 | 500 | | |
543 | 501 | | |
544 | | - | |
| 502 | + | |
545 | 503 | | |
546 | 504 | | |
547 | 505 | | |
| |||
594 | 552 | | |
595 | 553 | | |
596 | 554 | | |
597 | | - | |
598 | | - | |
| 555 | + | |
| 556 | + | |
599 | 557 | | |
600 | 558 | | |
601 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
1013 | 1015 | | |
1014 | 1016 | | |
1015 | 1017 | | |
1016 | | - | |
| 1018 | + | |
| 1019 | + | |
1017 | 1020 | | |
1018 | 1021 | | |
1019 | 1022 | | |
| |||
1032 | 1035 | | |
1033 | 1036 | | |
1034 | 1037 | | |
1035 | | - | |
| 1038 | + | |
| 1039 | + | |
1036 | 1040 | | |
1037 | 1041 | | |
1038 | 1042 | | |
1039 | 1043 | | |
1040 | 1044 | | |
1041 | 1045 | | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1042 | 1049 | | |
1043 | 1050 | | |
1044 | 1051 | | |
| |||
1080 | 1087 | | |
1081 | 1088 | | |
1082 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1083 | 1130 | | |
1084 | 1131 | | |
1085 | 1132 | | |
| |||
0 commit comments