Skip to content

Commit

Permalink
no extra @synchronized block per batch (iOS/macOS)
Browse files Browse the repository at this point in the history
should be considered a POSSIBLY BREAKING change

ref: #769
  • Loading branch information
Christopher J. Brody committed Jan 29, 2019
1 parent d7b9605 commit d21a26c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

###### cordova-sqlite-storage-ext-core-common 1.0.1-dev

- no extra @synchronized block per batch (iOS/macOS) - should be considered a POSSIBLY BREAKING change
- remove backgroundExecuteSql method not needed (iOS/macOS)
- Completely remove iOS/macOS MRC (Manual Reference Counting) support - should be considered a POSSIBLY BREAKING change
- Use SQLite 3.26.0 (with a security update and support for window functions) with SQLITE_DEFAULT_SYNCHRONOUS=3 (EXTRA DURABLE) from cordova-sqlite-storage-dependencies 1.2.1 in this plugin version branch
Expand Down
8 changes: 3 additions & 5 deletions src/ios/SQLitePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ -(void) executeSqlBatchNow: (CDVInvokedUrlCommand*)command

CDVPluginResult* pluginResult;

@synchronized(self) {
{
for (NSMutableDictionary *dict in executes) {
CDVPluginResult *result = [self executeSqlWithDict:dict andArgs:dbargs];
if ([result.status intValue] == CDVCommandStatus_ERROR) {
Expand Down Expand Up @@ -299,10 +299,8 @@ -(void) executeSql: (CDVInvokedUrlCommand*)command
NSMutableDictionary *dbargs = [options objectForKey:@"dbargs"];
NSMutableDictionary *ex = [options objectForKey:@"ex"];

CDVPluginResult* pluginResult;
@synchronized (self) {
pluginResult = [self executeSqlWithDict: ex andArgs: dbargs];
}
CDVPluginResult * pluginResult = [self executeSqlWithDict: ex andArgs: dbargs];

[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}

Expand Down

0 comments on commit d21a26c

Please sign in to comment.