• vogelheim's avatar
    Fix NativesCollection<.>::GetScriptName in natives-external.cc · 881a921b
    vogelheim authored
    As there's no associated bug, here's the issue:
    - Some ES6 functionality in Chrome is presently broken; this fixes it.
    - The natives (built-in libraries) can be accessed by their 'name'.
      This is used to active ES6 flags.
    - Strangely enough, there's an id and a name, where the name is derived
      from the id as "native %s.js", with %s for the id.
    - NativesCollection<.>::GetScriptName uses the name.
    - NativesCollection<.>::GetIndex uses the id.
    - Example:
      NativesCollection<EXPERIMENTAL>::GetIndex("harmony-string") -> 3
      NativesCollection<EXPERIMENTAL>::GetScriptName(3) -> "native harmony-string.js"
    - Nobody knows why; it's quite mysterious.
    - When introducing the "external startup data", I didn't fully understand this
      and used the id in both places.
    - When the "external startup data" was turned on in Chrome, ES6 features broke
      in Chrome since the libraries could no longer be found.
    - This CL fixes this and makes the external startup data behave just like the
      built-in version.
    
    R=dslomov
    BUG=
    
    Review URL: https://codereview.chromium.org/774613003
    
    Cr-Commit-Position: refs/heads/master@{#25624}
    881a921b
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
include Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...