Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 774613003: Fix NativesCollection<.>::GetScriptName in natives-external.cc (Closed)

Created:
6 years ago by vogelheim
Modified:
6 years ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Project:
v8
Visibility:
Public.

Description

Fix 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… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -29 lines) Patch
M src/bootstrapper.cc View 1 2 2 chunks +9 lines, -16 lines 0 comments Download
M src/natives-external.cc View 2 2 chunks +30 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
vogelheim
6 years ago (2014-12-02 11:46:04 UTC) #1
Dmitry Lomov (no reviews)
https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc File src/natives-external.cc (right): https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc#newcode84 src/natives-external.cc:84: Vector<const char> NameFromId(const byte* id, int id_length) { At ...
6 years ago (2014-12-02 12:17:48 UTC) #3
vogelheim
https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc File src/natives-external.cc (right): https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc#newcode84 src/natives-external.cc:84: Vector<const char> NameFromId(const byte* id, int id_length) { On ...
6 years ago (2014-12-02 13:58:28 UTC) #4
Dmitry Lomov (no reviews)
On 2014/12/02 13:58:28, vogelheim wrote: > https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc > File src/natives-external.cc (right): > > https://codereview.chromium.org/774613003/diff/1/src/natives-external.cc#newcode84 > ...
6 years ago (2014-12-02 14:14:01 UTC) #5
vogelheim
On 2014/12/02 14:14:01, Dmitry Lomov (chromium) wrote: > On 2014/12/02 13:58:28, vogelheim wrote: > > ...
6 years ago (2014-12-02 14:22:23 UTC) #6
Dmitry Lomov (no reviews)
lgtm
6 years ago (2014-12-02 14:27:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/774613003/40001
6 years ago (2014-12-02 18:24:35 UTC) #9
commit-bot: I haz the power
6 years ago (2014-12-02 18:53:34 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:40001)

Powered by Google App Engine
This is Rietveld 408576698