DescriptionFix NativesCollection<.>::GetScriptName in natives-external.cc
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=
Patch Set 1 #
Total comments: 2
Patch Set 2 : Make sure string is always 0-terminated. #Patch Set 3 : Drop the 0-byte business, and instead fix caller to not make assumption about the return value of G… #Messages
Total messages: 10 (2 generated)
|