-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix comment on #5201 #5209
Fix comment on #5201 #5209
Conversation
third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.cc
Outdated
Show resolved
Hide resolved
af4ba19
to
64257eb
Compare
64257eb
to
5d16dba
Compare
third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.h
Outdated
Show resolved
Hide resolved
LGTM other than my one open comment, seems to address Miguel's concerns too but I'll let him review |
@yell0wd0g I updated the conditions slightly in b6ad7da, ptal |
Tested this locally and it seems to work, though Sergei wants to do a bit more testing—will submit in a few |
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 with the comments addressed.
third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.cc
Outdated
Show resolved
Hide resolved
third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.cc
Outdated
Show resolved
Hide resolved
third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.h
Outdated
Show resolved
Hide resolved
Tested locally after latest changes and seems to work |
1. Corrects duplicate Mojo listener registration by removing the `RemoteAddListener()` call from `setOndeeplink()`. Registration logic is now correctly handled only within the `AddedEventListener()`, which is triggered by both property assignment and `addEventListener`. 2. Using the `DEFINE_ATTRIBUTE_EVENT_LISTENER` macro to replace `ondeeplink`/`setOndeeplink` methods. 3. Renaming `EnsureReceiverIsBound` to `EnsureRemoteIsBound`, it is for remote_h5vcc_runtime_. 4. Renaming `receiver_` to `listener_receiver_` and adding the `listener_registered_` flag for tracking AddListener 's state. https://screenshot.googleplex.com/8jeU7xBYSLq2gLN is the proof of no app crash for multiple registration of the callbacks. b/374147993 --------- Co-authored-by: Colin Liang <[email protected]> Co-authored-by: Andrew Savage <[email protected]> (cherry picked from commit f9000af)
Refer to the original PR: #5209 1. Corrects duplicate Mojo listener registration by removing the `RemoteAddListener()` call from `setOndeeplink()`. Registration logic is now correctly handled only within the `AddedEventListener()`, which is triggered by both property assignment and `addEventListener`. 2. Using the `DEFINE_ATTRIBUTE_EVENT_LISTENER` macro to replace `ondeeplink`/`setOndeeplink` methods. 3. Renaming `EnsureReceiverIsBound` to `EnsureRemoteIsBound`, it is for remote_h5vcc_runtime_. 4. Renaming `receiver_` to `listener_receiver_` and adding the `listener_registered_` flag for tracking AddListener 's state. https://screenshot.googleplex.com/8jeU7xBYSLq2gLN is the proof of no app crash for multiple registration of the callbacks. b/374147993 Co-authored-by: Colin Liang <[email protected]>
RemoteAddListener()
call fromsetOndeeplink()
. Registration logic is now correctly handled only within theAddedEventListener()
, which is triggered by both property assignment andaddEventListener
.DEFINE_ATTRIBUTE_EVENT_LISTENER
macro to replaceondeeplink
/setOndeeplink
methods.EnsureReceiverIsBound
toEnsureRemoteIsBound
, it is for remote_h5vcc_runtime_.receiver_
tolistener_receiver_
and adding thelistener_registered_
flag for tracking AddListener 's state.https://screenshot.googleplex.com/8jeU7xBYSLq2gLN is the proof of no app crash for multiple registration of the callbacks.
b/374147993