6c22b1dcf0
Snapshot writer serializes a tear-off of a static function as a triple [library-url, class-name, function-name]. However it does not scrub these names (String::ScrubName can cause an allocation and subsequently a GC which means it can't be used when writing snapshot). As a result of this private names arrive mangled to the receiving isolate, which would fail to look these names up if its private library keys are different. This patch fixes sporadic failures that can be caused by this. Note: even if two isolates start from the very same main URI libraries in those isolates might end up with different private keys because private key consists of library-sequence-number and a URL hash. URL hashes are guaranteed to be stable but library-sequence-numbers might get out of sync due to asynchronous loading. Bug: Change-Id: I4b39cb20a1713d3e992352c501cf1b9a476779ef Reviewed-on: https://dart-review.googlesource.com/5721 Reviewed-by: Siva Annamalai <asiva@google.com>