Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
src: disallow calling env-dependent methods during bootstrap #27234
These cannot be preserved correctly in v8 snapshot. Currently
Consider this, on the machine that builds releases:
User downloads this binary to their machine:
This patch only adds checks in methods that get states from the
BridgeAR left a comment
LGTM. Would it also be sufficient to use a DCHECK instead? Our CI should at least detect these and the check does not have to be executed in the default case anymore. But I do not know if this check is expensive or not (I guess it's just a simple state check?).
@bnoordhuis The process properties that depend on run time states (e.g.
The process methods are still included in the bootstrap because the function themselves do not depend on run time states, only the results of their invocation do - I guess we could also attach the accessor properties earlier, but until we have snapshot enabled there is not much difference in terms of overhead.