-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core][Darwin] SDK objects should hold weak pointers to the core style objects #15539
Conversation
d08776d
to
5a76003
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - a few minor comments. I will test as we discussed.
We should update
-[MGLImageSource description]
-[MGLShapeSource description]
as they could trigger the exception, which we don't want in this case.
@julianrex Thanks for your comments! considered in the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! for core changes.
@@ -6,6 +6,8 @@ | |||
#include <mbgl/style/types.hpp> | |||
#include <mbgl/style/conversion.hpp> | |||
|
|||
#include <mapbox/weak.hpp> | |||
|
|||
#include <cassert> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit unrelated to this PR: looks like cassert and stdexcept can be removed
66382ce
to
a804570
Compare
@pozdnyakov FYI updated with some tweaks, and an additional test. |
@captainbarbosa can you review the ios/macos bits please? |
… error, rather than raising an exception.
…st for style layers.
bfe657c
to
8fa33f1
Compare
Thus, we can avoid crashes caused by dangling raw{Source|Layer} pointer after new style is parsed.
Fixes #15333