Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7c363fd
dart side of implementation
bparrishMines May 11, 2022
2e55266
objc side of callback impl
bparrishMines May 12, 2022
4a12eaa
documentation and a test messenger
bparrishMines May 12, 2022
6bc048b
dart side update
bparrishMines May 16, 2022
4efa9a1
objc side
bparrishMines May 16, 2022
f9d54e2
formatting
bparrishMines May 16, 2022
2f73074
Merge branch 'main' of github.com:flutter/plugins into callbacks
bparrishMines May 16, 2022
ddfde5c
handles
bparrishMines May 17, 2022
96c21ae
some fixes for PR comments
bparrishMines May 18, 2022
f2a3504
new instance manager
bparrishMines May 19, 2022
77da52f
bunch of work
bparrishMines May 19, 2022
e388090
instance manager tests
bparrishMines May 19, 2022
ac3a2de
fix foundation tests
bparrishMines May 19, 2022
696c25c
dart touchups
bparrishMines May 19, 2022
88816c9
finish dart standardization and support earlier versions
bparrishMines May 19, 2022
9d25ab1
fix dart instance manager
bparrishMines May 19, 2022
4d7ebc4
instance manager ish
bparrishMines May 19, 2022
81b201f
most tests passing
bparrishMines May 19, 2022
62581ba
instance manager tests
bparrishMines May 20, 2022
f0d2498
formatting and one last test
bparrishMines May 20, 2022
4bd6d2a
formatting
bparrishMines May 20, 2022
7974d56
naming
bparrishMines May 20, 2022
ad9b4e6
better comment
bparrishMines May 20, 2022
d8b720e
update comment with info about platform/flutter
bparrishMines May 23, 2022
3c98004
fix bug from instance manager identifier
bparrishMines May 24, 2022
368fb30
limits on identifiers
bparrishMines May 25, 2022
a6980c5
use removeReference name instead
bparrishMines May 25, 2022
179f109
maybe an even better name?
bparrishMines May 25, 2022
e966816
use init constructor
bparrishMines May 25, 2022
3897535
version bump
bparrishMines May 25, 2022
312825a
update name
bparrishMines May 25, 2022
36fa0a0
Merge branch 'main' of github.com:flutter/plugins into callbacks
bparrishMines May 25, 2022
2b7a9af
undo changes to webview_flutter
bparrishMines May 25, 2022
86b193a
add api impls
bparrishMines May 25, 2022
61d5f8a
undo changes to create methods
bparrishMines May 25, 2022
29e8ad0
changes and stuff
bparrishMines May 25, 2022
2be09aa
some updates
bparrishMines May 26, 2022
e212aa4
Merge branch 'main' of github.com:flutter/plugins into callbacks
bparrishMines May 26, 2022
ea0fe93
method names
bparrishMines May 26, 2022
9e47dda
more docs, yay
bparrishMines May 26, 2022
8076bed
spelling and docs
bparrishMines May 31, 2022
0fa7a14
pr comments
bparrishMines Jun 2, 2022
797d448
format and issue
bparrishMines Jun 2, 2022
ba8161a
Merge branch 'main' of github.com:flutter/plugins into callbacks
bparrishMines Jun 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting
  • Loading branch information
bparrishMines committed May 20, 2022
commit 4bd6d2affff35fb43aaa1bad26acbf0c6bd986f5
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,6 @@

#import <OCMock/OCMock.h>

// Used to test that a FlutterBinaryMessenger with a strong reference to a host api won't
// lead to a circular reference.
@interface FWFTestMessenger : NSObject <FlutterBinaryMessenger>
@property(strong, nullable) id hostAPI;
@end

@implementation FWFTestMessenger
- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection {
}

- (void)sendOnChannel:(nonnull NSString *)channel message:(NSData *_Nullable)message {
}

- (void)sendOnChannel:(nonnull NSString *)channel
message:(NSData *_Nullable)message
binaryReply:(FlutterBinaryReply _Nullable)callback {
}

- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(nonnull NSString *)channel
binaryMessageHandler:
(FlutterBinaryMessageHandler _Nullable)handler {
return 0;
}
@end

@interface FWFNavigationDelegateHostApiTests : XCTestCase
@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ typedef void (^FWFOnDeallocCallback)(long identifier);
/**
* Retrieves the identifier paired with an instance.
*
*
* @param instance An instance that may be stored in the manager.
* @param willBePassed Whether the identifier will be passed to Dart. If YES, the strong reference
* to `instance` will be recreated and will need to be removed again by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#import "FWFInstanceManager.h"
#import <objc/runtime.h>

// Attach to an object to track when an object is deallocated.
// Attaches to an object to receive a callback when the object is deallocated.
@interface FWFFinalizer : NSObject
@property(nonatomic) long identifier;
// Callbacks are no longer made once FWFInstanceManager is inaccessible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class InstanceManager {
/// Returns the identifier associated with the removed instance. Otherwise,
/// `null` if the instance was not found in this manager.
///
/// This does not remove the the strong referenced instance associtated with
/// This does not remove the the strong referenced instance associated with
/// [instance]. This can be done with [removeStrongReference].
int? removeWeakReference(Copyable instance) {
final int? identifier = getIdentifier(instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@ class WKNavigationDelegate extends NSObject {
/// Constructs a [WKNavigationDelegate] without creating the associated
/// Objective-C object.
///
/// This should only be used by subclasses created by this library or to
/// create copies.
/// This should only be used by subclasses created by this library or by an
/// InstanceManager creating copies.
WKNavigationDelegate.detached({
this.didFinishNavigation,
BinaryMessenger? binaryMessenger,
Expand Down