Skip to content

Commit

Permalink
Pruning ASExperimentalRemoveTextKitInitialisingLock code. (#1766)
Browse files Browse the repository at this point in the history
* Remove code for unused ASExperimentalRemoveTextKitInitialisingLock experiment.

* Prune some additional unnecessary references.

Co-authored-by: rgupta-pinterest <[email protected]>
  • Loading branch information
trufflin and rgupta-pinterest committed Jan 28, 2020
1 parent 01b613e commit 70613a6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion Schemas/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"exp_did_enter_preload_skip_asm_layout",
"exp_dispatch_apply",
"exp_oom_bg_dealloc_disable",
"exp_remove_textkit_initialising_lock"
]
}
}
Expand Down
7 changes: 3 additions & 4 deletions Source/ASExperimentalFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) {
ASExperimentalDidEnterPreloadSkipASMLayout = 1 << 7, // exp_did_enter_preload_skip_asm_layout
ASExperimentalDispatchApply = 1 << 8, // exp_dispatch_apply
ASExperimentalOOMBackgroundDeallocDisable = 1 << 9, // exp_oom_bg_dealloc_disable
ASExperimentalRemoveTextKitInitialisingLock = 1 << 10, // exp_remove_textkit_initialising_lock
ASExperimentalDrawingGlobal = 1 << 11, // exp_drawing_global
ASExperimentalOptimizeDataControllerPipeline = 1 << 12, // exp_optimize_data_controller_pipeline
ASExperimentalTraitCollectionDidChangeWithPreviousCollection = 1 << 13, // exp_trait_collection_did_change_with_previous_collection
ASExperimentalDrawingGlobal = 1 << 10, // exp_drawing_global
ASExperimentalOptimizeDataControllerPipeline = 1 << 11, // exp_optimize_data_controller_pipeline
ASExperimentalTraitCollectionDidChangeWithPreviousCollection = 1 << 12, // exp_trait_collection_did_change_with_previous_collection
ASExperimentalFeatureAll = 0xFFFFFFFF
};

Expand Down
1 change: 0 additions & 1 deletion Source/ASExperimentalFeatures.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@"exp_did_enter_preload_skip_asm_layout",
@"exp_dispatch_apply",
@"exp_oom_bg_dealloc_disable",
@"exp_remove_textkit_initialising_lock",
@"exp_drawing_global",
@"exp_optimize_data_controller_pipeline",
@"exp_trait_collection_did_change_with_previous_collection"]));
Expand Down
2 changes: 0 additions & 2 deletions Source/TextKit/ASTextKitContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString
static dispatch_once_t onceToken;
// Concurrently initialising TextKit components crashes (rdar://18448377) so we use a global lock.
dispatch_once(&onceToken, ^{
if (!ASActivateExperimentalFeature(ASExperimentalRemoveTextKitInitialisingLock)) {
mutex = new AS::Mutex();
}
});
if (mutex != NULL) {
mutex->lock();
Expand Down
2 changes: 0 additions & 2 deletions Tests/ASConfigurationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
ASExperimentalDidEnterPreloadSkipASMLayout,
ASExperimentalDispatchApply,
ASExperimentalOOMBackgroundDeallocDisable,
ASExperimentalRemoveTextKitInitialisingLock,
ASExperimentalDrawingGlobal,
ASExperimentalOptimizeDataControllerPipeline
};
Expand All @@ -53,7 +52,6 @@ + (NSArray *)names {
@"exp_did_enter_preload_skip_asm_layout",
@"exp_dispatch_apply",
@"exp_oom_bg_dealloc_disable",
@"exp_remove_textkit_initialising_lock",
@"exp_drawing_global",
@"exp_optimize_data_controller_pipeline"
];
Expand Down

0 comments on commit 70613a6

Please sign in to comment.