GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — chore(runtime): remove the unused JSToJavaConverter and reuse cached signature tokens by edusperoni · Pull Request #2072 · NativeScript/android Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The conversions/ tree was a rewrite of the JS-to-Java argument marshalling that was switched back to JsArgConverter the day it landed (b5218c9 "use this converter again temporarily") and has had no callers since. It was still compiled into the runtime, and the only references left were commented-out lines in CallbackHandlers.cpp. Drop the sources, their CMakeLists.txt entries and the commented-out call sites. No live code includes any header from that folder.
When the metadata entry is resolved, JsArgConverter copied entry->parsedSig into its own vector on every Java call, allocating one std::string per parameter (object tokens such as Ljava/lang/String; exceed the small-string buffer and hit the heap). Read the tokens through a pointer instead: it points at the entry's cached parsedSig when available, and at an owned vector only when the converter has to parse the signature itself. The converter is a per-call stack object while the entry is owned by the class's MethodCallbackData for the isolate's lifetime, so the pointer cannot outlive its target. Copying is deleted since the pointer may refer to the converter's own member.
e7e4162 to
ee8114b
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.