Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
32ba8ae
repl: fix old history error handling
BridgeAR Jun 17, 2017
b5d0a03
test: fix error handling test-http-full-response
Trott Jul 15, 2017
d2121ab
doc: fix minor typo in cluster.md
lance Jul 18, 2017
72febfd
test: replace concatenation with template literals
csvwolf Jul 16, 2017
53ad91c
doc,stream: _transform happens one at a time
mcollina Jul 17, 2017
34821f6
repl: don't terminate on null thrown
Jul 16, 2017
dc0a26f
doc: replace dead link in v8 module
drboyer Jul 19, 2017
3bc7d2a
test: replace string concat in test-fs-watchfile.js
Helianthus21 Jul 16, 2017
f6a0343
docs: add note about fs.rmdir()
Oleksandr-Kushchak-i2 Jul 17, 2017
def98c6
test: replace string concatenation with template
nathansmile Jul 18, 2017
5ab4471
build,tools: do not force codesign prefix
evanlucas Jul 12, 2017
0ebb4df
build: codesign tarball binary on macOS
evanlucas Jul 12, 2017
94c7331
test: replace string concatenation with path.join
jkzing Jul 16, 2017
c866c90
test: use path.join for long path concatenation
jankjn Jul 16, 2017
9b104b4
benchmark: add assert map and set benchmarks
BridgeAR Jul 18, 2017
956a473
test: move test-fs-largefile to pummel
Trott Jul 18, 2017
b12924d
doc: add XadillaX to collaborators
XadillaX Jul 20, 2017
4be373b
doc: fixes default shell in child_process.md
henryzxu Jul 12, 2017
0197ba0
test: add comments for whatwg-url tests
gautamarora Jul 19, 2017
f1b09c0
doc: fix typo in stream.md
Jul 19, 2017
3c92b78
test: use path.join in async-hooks/test-tlswrap.js
Jul 17, 2017
e237720
test: replace string concatenation with template
Jul 16, 2017
e54f75b
readline: remove the caching variable
Jul 16, 2017
99104e1
test: improve fs.exists coverage
jkzing Jul 16, 2017
11ae8c3
test: delete obsolete test-sendfd.js
decareano Jul 17, 2017
9b22acc
test: fix flaky test-net-write-after-close
Trott Jul 19, 2017
592787e
doc: error message are still major
refack Jul 19, 2017
953736c
test: move timing-dependent tests to sequential
aqrln Jul 19, 2017
c0ea5d8
tools: always include llvm_version in config
nanaya Jul 5, 2017
ebb9090
tools: skip workaround for newer llvm
nanaya Jul 5, 2017
3414e42
test: replace concatenation with template literals
leizongmin Jul 16, 2017
83c8e5c
doc: describe labelling process for backports
addaleax Apr 15, 2017
265f159
test: replace concatenation with template literals
4garfield Jul 16, 2017
d9273ed
deps: cherry-pick 18ea996 from c-ares upstream
addaleax Jul 15, 2017
0418a70
test: add non-internet resolveAny tests
addaleax Jun 22, 2017
6c6da38
doc: fix some links
vsemozhetbyt Jul 20, 2017
552d2be
test: improve test-util-inspect
psmarshall Jun 30, 2017
28f0693
lib: include cached modules in module.children
bnoordhuis Jul 8, 2017
fa134dd
n-api: add fast paths for integer getters
addaleax Jul 20, 2017
272f494
deps: update V8 to 5.9.211.35
targos Jun 7, 2017
613c81e
deps: limit regress/regress-crbug-514081 v8 test
mhdawson May 9, 2016
fae03e6
deps: run memory hungry V8 test in exclusive mode
targos Jun 6, 2017
ad928c0
deps: add missing include to V8 i18n.cc
targos May 22, 2017
5fb7a0b
deps: fix addons compilation with VS2013
bzoz May 23, 2017
1906077
v8: fix stack overflow in recursive method
bnoordhuis Apr 17, 2017
0be4d17
v8: fix gcc 7 build errors
targos Jun 7, 2017
6204fad
deps: cherry-pick bfae9db from upstream v8
bnoordhuis Apr 28, 2017
4c4f647
deps: cherry-pick f5fad6d from upstream v8
danbev May 2, 2017
65956e6
deps: cherry-pick 6d38f89 from upstream V8
targos May 28, 2017
83636a4
deps: backport 4fdf9fd4813 from upstream v8
jeisinger Apr 21, 2017
1e93589
v8: do not test v8 with -Werror
addaleax May 6, 2017
da35ac3
v8: backport bd59e7452be from upstream v8
mi-ac May 24, 2017
e3c1119
v8: backport a9e56f4f36d from upstream v8
psmarshall May 25, 2017
61a1f9c
v8: backport 4f82f1d948c from upstream v8
hannespayer May 8, 2017
9c7af15
v8: backport 4f82f1d948c from upstream v8
hannespayer May 8, 2017
e3fcdef
v8: backport pieces from 18a26cfe174 from upstream v8
psmarshall May 26, 2017
8e96729
deps: cherry-pick a16c3c9 from upstream V8
jeremyroman Apr 27, 2017
06d419f
deps: cherry-pick 866ee63 from upstream V8
targos Jun 12, 2017
55a1231
v8: fix debug builds on Windows
bzoz Jun 12, 2017
da93046
deps: update V8 to 5.9.211.37
targos Jun 19, 2017
da1913c
deps: cherry-pick 3f4536894ac from V8 upstream
oliverchang May 5, 2017
89961ba
src: fix process.abort() interaction with V8
addaleax Jun 29, 2017
577b4f7
deps: cherry-pick 6cb999b97b from V8 upstream
isheludko Jul 5, 2017
d4c2406
2017-07-??, Version 8.3.0 (Current)
addaleax Jul 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: cherry-pick 6cb999b97b from V8 upstream
Original commit message:

    Properly handle loads from global interceptor via prototype chain.

    ... when receiver is in dictionary mode.

    Bug: v8:6490
    Change-Id: Ic5a8d214adcc4efd4cb163cbc6b351c4e6b596af
    Reviewed-on: https://chromium-review.googlesource.com/559548
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46428}

Ref: https://chromium.googlesource.com/v8/v8.git/+/6cb999b97b7953ebfd4aabf2e1f62bf405f21c69
Fixes: #13804
PR-URL: #14188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
isheludko authored and addaleax committed Jul 24, 2017
commit 577b4f75f6532de275d134ecfe3f1abdfc2f0cd3
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 9
#define V8_BUILD_NUMBER 211
#define V8_PATCH_LEVEL 37
#define V8_PATCH_LEVEL 38

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
5 changes: 5 additions & 0 deletions deps/v8/src/ic/handler-configuration-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
namespace v8 {
namespace internal {

// Decodes kind from Smi-handler.
LoadHandler::Kind LoadHandler::GetHandlerKind(Smi* smi_handler) {
return KindBits::decode(smi_handler->value());
}

Handle<Smi> LoadHandler::LoadNormal(Isolate* isolate) {
int config = KindBits::encode(kNormal);
return handle(Smi::FromInt(config), isolate);
Expand Down
3 changes: 3 additions & 0 deletions deps/v8/src/ic/handler-configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class LoadHandler {
static const int kHolderCellIndex = 2;
static const int kFirstPrototypeIndex = 3;

// Decodes kind from Smi-handler.
static inline Kind GetHandlerKind(Smi* smi_handler);

// Creates a Smi-handler for loading a property from a slow object.
static inline Handle<Smi> LoadNormal(Isolate* isolate);

Expand Down
21 changes: 16 additions & 5 deletions deps/v8/src/ic/ic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -868,10 +868,15 @@ int GetPrototypeCheckCount(Isolate* isolate, Handle<Map> receiver_map,
Handle<FixedArray>(), 0);
}

enum class HolderCellRequest {
kGlobalPropertyCell,
kHolder,
};

Handle<WeakCell> HolderCell(Isolate* isolate, Handle<JSObject> holder,
Handle<Name> name, Handle<Smi> smi_handler) {
if (holder->IsJSGlobalObject() &&
*smi_handler != *LoadHandler::LoadInterceptor(isolate)) {
Handle<Name> name, HolderCellRequest request) {
if (request == HolderCellRequest::kGlobalPropertyCell) {
DCHECK(holder->IsJSGlobalObject());
Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(holder);
GlobalDictionary* dict = global->global_dictionary();
int number = dict->FindEntry(name);
Expand Down Expand Up @@ -908,8 +913,14 @@ Handle<Object> LoadIC::LoadFromPrototype(Handle<Map> receiver_map,
Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate());
DCHECK(!validity_cell.is_null());

Handle<WeakCell> holder_cell =
HolderCell(isolate(), holder, name, smi_handler);
// LoadIC dispatcher expects PropertyCell as a "holder" in case of kGlobal
// handler kind.
HolderCellRequest request =
LoadHandler::GetHandlerKind(*smi_handler) == LoadHandler::kGlobal
? HolderCellRequest::kGlobalPropertyCell
: HolderCellRequest::kHolder;

Handle<WeakCell> holder_cell = HolderCell(isolate(), holder, name, request);

if (checks_count == 0) {
return isolate()->factory()->NewTuple3(holder_cell, smi_handler,
Expand Down
35 changes: 35 additions & 0 deletions deps/v8/test/cctest/test-api-interceptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,41 @@ THREADED_TEST(InterceptorLoadGlobalICGlobalWithInterceptor) {
CHECK(value->BooleanValue(context.local()).FromJust());
}

// Test load of a non-existing global through prototype chain when a global
// object has an interceptor.
THREADED_TEST(InterceptorLoadICGlobalWithInterceptor) {
i::FLAG_allow_natives_syntax = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope scope(isolate);
v8::Local<v8::ObjectTemplate> templ_global = v8::ObjectTemplate::New(isolate);
templ_global->SetHandler(v8::NamedPropertyHandlerConfiguration(
GenericInterceptorGetter, GenericInterceptorSetter));

LocalContext context(nullptr, templ_global);
i::Handle<i::JSReceiver> global_proxy =
v8::Utils::OpenHandle<Object, i::JSReceiver>(context->Global());
CHECK(global_proxy->IsJSGlobalProxy());
i::Handle<i::JSGlobalObject> global(
i::JSGlobalObject::cast(global_proxy->map()->prototype()));
CHECK(global->map()->has_named_interceptor());

ExpectInt32(
"(function() {"
" var f = function(obj) { "
" return obj.foo;"
" };"
" var obj = { __proto__: this, _str_foo: 42 };"
" for (var i = 0; i < 1500; i++) obj['p' + i] = 0;"
" /* Ensure that |obj| is in dictionary mode. */"
" if (%HasFastProperties(obj)) return -1;"
" for (var i = 0; i < 3; i++) {"
" f(obj);"
" };"
" return f(obj);"
"})();",
42);
}

static void InterceptorLoadICGetter0(
Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
ApiTestFuzzer::Fuzz();
Expand Down