| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Every delivery path built its MessageEvent through the public constructor, whose init dictionary turns an undefined data into null. Delivery now goes through an internal factory that stores the payload as given, and the native messageerror paths pass null so that event keeps its default data.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 8eadd574-6118-400e-997a-f3d638e7610e 📥 CommitsReviewing files that changed from the base of the PR and between 6221ca8 and b7f17b5. 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 Walkthrough WalkthroughThe change adds a message-event factory that preserves undefined payloads, updates messaging relays to use it, normalizes deserialization-error data to null, and adds cross-runtime regression tests for falsy values. ChangesMessaging data preservation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: edusperoni Merge Risk: ⚪ Minimal · up to b7f17 The messaging update preserves delivered undefined payloads while retaining constructor defaults and explicit messageerror null handling. No merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
Explanation Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 9 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareA rabbit carried messages light, Comment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
|
@adrian-niculescu thank you! If you can, please open the PR stacked against the android PRs so we can fix it there too |
Sorry, something went wrong.
|
@edusperoni done: NativeScript/android#2063 is stacked on NativeScript/android#2043 and ports this fix together with #489 (the worker messageerror carrying the deserialization error). While working on it I found a few more problems in the new messaging code. Each has its own Android PR stacked on NativeScript/android#2043, with the iOS fix next to it:
There is also an open question on environment-data key identity, on the Android PR: NativeScript/android#2043 (comment) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
worker.postMessage(undefined) arrives with event.data === null. The same happens on a MessagePort, on a BroadcastChannel and on the node:worker_threads parentPort. Browsers deliver undefined; null, false, 0 and "" already arrive unchanged.
Every delivery path built its event with new MessageEvent(type, { data, ports }). The constructor is right to turn an absent or undefined data into null, that is what Web IDL does for its init dictionary, but a delivered message is not built from a dictionary: it carries whatever the payload deserialized to. message-event.js now exports an internal createMessageEvent(type, data, ports) that stores the payload as given, and the four delivery sites use it. The public constructor is unchanged.
The two native messageerror paths relied on that defaulting to turn "nothing to carry" into null, so they now pass null themselves and that event keeps its default data.
New specs in MessagingTests.js cover each channel kind and fail without the fix.
Summary by CodeRabbit
Bug Fixes
Tests