Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
02602f7
deps: update V8 to 6.2.414.46
targos Jan 15, 2018
743012e
src: update NODE_MODULE_VERSION to 59
targos Jan 15, 2018
0252467
test: fix message test after V8 upgrade
targos Aug 28, 2017
e4dc16b
src: update ustack offset identifiers
geek Aug 28, 2017
fcd5860
src: fix rename of entry frame in v8abbr.h
geek Aug 29, 2017
3d3da4a
deps: cherry-pick 9b21865822243 from V8 upstream
addaleax Sep 8, 2017
7181fcd
deps: v8: fix potential segfault in profiler
ofrobots Sep 20, 2017
150e954
deps: backport 0f1dfae from V8 upstream
tebbi Oct 10, 2017
21bfde6
deps: cherry-pick 37a3a15c3 from V8 upstream
fhinkel Oct 18, 2017
d8de486
deps: cherry-pick 2c75616 from upstream V8
targos Oct 25, 2017
5a16d2e
deps: cherry-pick 676c413 from upstream V8
targos Oct 25, 2017
b56c82c
deps: cherry-pick e0d64dc from upstream V8
targos Oct 25, 2017
55d386c
deps: V8: backport b1cd96e from upstream
ofrobots Oct 18, 2017
dd8c994
deps: cherry-pick b8331cc030 from upstream V8
danbev Oct 30, 2017
3ad6a7d
deps: cherry-pick cc55747 from V8 upstream
fhinkel Nov 8, 2017
e2d41ed
deps: cherry-pick 1420e44db0 from upstream V8
TimothyGu Nov 27, 2017
259192f
deps: backport 3c8195d from V8 upstream
MylesBorins Nov 8, 2017
a10b18e
deps: V8: backport 14ac02c from upstream
ofrobots Dec 6, 2017
6e4a26d
deps: V8: cherry-pick ac0fe8ec from upstream
ofrobots Dec 15, 2017
c693140
deps: cherry-pick c3458a8 from upstream V8
targos Jan 11, 2018
d6e6253
deps: revert ABI breaking changes in V8 6.2
addaleax Oct 13, 2017
421626e
deps: revert ABI breaking changes in V8 6.1
addaleax Sep 14, 2017
c2f8d54
Revert "src: update NODE_MODULE_VERSION to 59"
MylesBorins Feb 7, 2018
40197d8
v8: make building addons with VS2013 work again
bnoordhuis Jan 29, 2018
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 37a3a15c3 from V8 upstream
Original commit message:
  [api] Intercept DefineProperty after Descriptor query

  Analog to other interceptors, intercept the DefineProperty
  call only after obtaining the property descriptor.

  This behavior allows us to mirror calls on a sandboxed object
  as it is needed in Node. See for example
  #13265

  Bug:
  Change-Id: I73b8f8908d13473939b37fb6727858d0bee6bda3
  Reviewed-on: https://chromium-review.googlesource.com/725295
  Reviewed-by: Andreas Haas <ahaas@chromium.org>
  Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#48683}

PR-URL: #16294
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
fhinkel authored and MylesBorins committed Feb 7, 2018
commit 21bfde6c245479f980918f0da54bb59037597209
2 changes: 1 addition & 1 deletion deps/v8/src/lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class V8_EXPORT_PRIVATE LookupIterator final BASE_EMBEDDED {
kInterceptor = 1 << 0,
kPrototypeChain = 1 << 1,

// Convience combinations of bits.
// Convenience combinations of bits.
OWN_SKIP_INTERCEPTOR = 0,
OWN = kInterceptor,
PROTOTYPE_CHAIN_SKIP_INTERCEPTOR = kPrototypeChain,
Expand Down
25 changes: 14 additions & 11 deletions deps/v8/src/objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6713,17 +6713,6 @@ Maybe<bool> JSReceiver::OrdinaryDefineOwnProperty(Isolate* isolate,
it.Next();
}

// Handle interceptor
if (it.state() == LookupIterator::INTERCEPTOR) {
if (it.HolderIsReceiverOrHiddenPrototype()) {
Maybe<bool> result = DefinePropertyWithInterceptorInternal(
&it, it.GetInterceptor(), should_throw, *desc);
if (result.IsNothing() || result.FromJust()) {
return result;
}
}
}

return OrdinaryDefineOwnProperty(&it, desc, should_throw);
}

Expand All @@ -6739,6 +6728,20 @@ Maybe<bool> JSReceiver::OrdinaryDefineOwnProperty(LookupIterator* it,
PropertyDescriptor current;
MAYBE_RETURN(GetOwnPropertyDescriptor(it, &current), Nothing<bool>());

it->Restart();
// Handle interceptor
for (; it->IsFound(); it->Next()) {
if (it->state() == LookupIterator::INTERCEPTOR) {
if (it->HolderIsReceiverOrHiddenPrototype()) {
Maybe<bool> result = DefinePropertyWithInterceptorInternal(
it, it->GetInterceptor(), should_throw, *desc);
if (result.IsNothing() || result.FromJust()) {
return result;
}
}
}
}

// TODO(jkummerow/verwaest): It would be nice if we didn't have to reset
// the iterator every time. Currently, the reasons why we need it are:
// - handle interceptors correctly
Expand Down
7 changes: 4 additions & 3 deletions deps/v8/test/cctest/test-api-interceptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -716,20 +716,21 @@ bool define_was_called_in_order = false;
void GetterCallbackOrder(Local<Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
get_was_called_in_order = true;
CHECK(define_was_called_in_order);
CHECK(!define_was_called_in_order);
info.GetReturnValue().Set(property);
}

void DefinerCallbackOrder(Local<Name> property,
const v8::PropertyDescriptor& desc,
const v8::PropertyCallbackInfo<v8::Value>& info) {
CHECK(!get_was_called_in_order); // Define called before get.
// Get called before DefineProperty because we query the descriptor first.
CHECK(get_was_called_in_order);
define_was_called_in_order = true;
}

} // namespace

// Check that definer callback is called before getter callback.
// Check that getter callback is called before definer callback.
THREADED_TEST(DefinerCallbackGetAndDefine) {
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::FunctionTemplate> templ =
Expand Down