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
1fb7a1a
deps: update V8 to 5.9.211.35
targos Jun 7, 2017
63633a4
deps: limit regress/regress-crbug-514081 v8 test
mhdawson May 9, 2016
dcd5c9b
deps: run memory hungry V8 test in exclusive mode
targos Jun 6, 2017
f835856
deps: add missing include to V8 i18n.cc
targos May 22, 2017
88c2af8
deps: fix addons compilation with VS2013
bzoz May 23, 2017
cbabf2a
v8: fix stack overflow in recursive method
bnoordhuis Apr 17, 2017
b47e758
v8: fix gcc 7 build errors
targos Jun 7, 2017
60afd95
deps: cherry-pick bfae9db from upstream v8
bnoordhuis Apr 28, 2017
ad7d46b
deps: cherry-pick f5fad6d from upstream v8
danbev May 2, 2017
767320c
deps: cherry-pick 6d38f89 from upstream V8
targos May 28, 2017
b769749
deps: backport 4fdf9fd4813 from upstream v8
jeisinger Apr 21, 2017
81895a5
v8: do not test v8 with -Werror
addaleax May 6, 2017
6cd148c
v8: backport bd59e7452be from upstream v8
mi-ac May 24, 2017
876031b
v8: backport a9e56f4f36d from upstream v8
psmarshall May 25, 2017
f01016c
v8: backport 4f82f1d948c from upstream v8
hannespayer May 8, 2017
aa2dfc4
v8: backport 4f82f1d948c from upstream v8
hannespayer May 8, 2017
2a1b8bf
v8: backport pieces from 18a26cfe174 from upstream v8
psmarshall May 26, 2017
fb8aba0
deps: cherry-pick a16c3c9 from upstream V8
jeremyroman Apr 27, 2017
5d5eb0b
deps: cherry-pick 866ee63 from upstream V8
targos Jun 12, 2017
31142a7
v8: fix debug builds on Windows
bzoz Jun 12, 2017
147d8f1
deps: update V8 to 5.9.211.37
targos Jun 19, 2017
356af65
deps: cherry-pick 3f4536894ac from V8 upstream
oliverchang May 5, 2017
e2ae710
src: fix process.abort() interaction with V8
addaleax Jun 29, 2017
646eff0
deps: cherry-pick 6cb999b97b from V8 upstream
isheludko Jul 5, 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
v8: backport bd59e7452be from upstream v8
Original commit message:
    [PATCH] Merged: Make Object::GetOwnPropertyDescriptor() take a Name, not a String.

    Revision: b5e610c19208ef854755eec67011ca7aff008bf4

    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true
    TBR=vogelheim@chromium.org

    Bug:
    Change-Id: I396b559b28aab6afa138db747711e50cd0da3da7
    Reviewed-on: https://chromium-review.googlesource.com/513927
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/branch-heads/6.0@{#5}
    Cr-Branched-From: 97dbf624a5eeffb3a8df36d24cdb2a883137385f-refs/heads/6.0.286@{#1}
    Cr-Branched-From: 12e6f1cb5cd9616da7b9d4a7655c088778a6d415-refs/heads/master@{#45439}

PR-URL: #13217
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mi-ac authored and targos committed Jul 21, 2017
commit 6cd148cfdcde78ca0d0f3e099f7427f9dcb337f2
6 changes: 3 additions & 3 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -3070,12 +3070,12 @@ class V8_EXPORT Object : public Value {
Local<Context> context, Local<Value> key);

/**
* Returns Object.getOwnPropertyDescriptor as per ES5 section 15.2.3.3.
* Returns Object.getOwnPropertyDescriptor as per ES2016 section 19.1.2.6.
*/
V8_DEPRECATED("Use maybe version",
Local<Value> GetOwnPropertyDescriptor(Local<String> key));
Local<Value> GetOwnPropertyDescriptor(Local<Name> key));
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetOwnPropertyDescriptor(
Local<Context> context, Local<String> key);
Local<Context> context, Local<Name> key);

V8_DEPRECATE_SOON("Use maybe version", bool Has(Local<Value> key));
/**
Expand Down
8 changes: 3 additions & 5 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4530,12 +4530,11 @@ PropertyAttribute v8::Object::GetPropertyAttributes(v8::Local<Value> key) {
.FromMaybe(static_cast<PropertyAttribute>(i::NONE));
}


MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context,
Local<String> key) {
Local<Name> key) {
PREPARE_FOR_EXECUTION(context, Object, GetOwnPropertyDescriptor, Value);
i::Handle<i::JSReceiver> obj = Utils::OpenHandle(this);
i::Handle<i::String> key_name = Utils::OpenHandle(*key);
i::Handle<i::Name> key_name = Utils::OpenHandle(*key);

i::PropertyDescriptor desc;
Maybe<bool> found =
Expand All @@ -4548,8 +4547,7 @@ MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context,
RETURN_ESCAPED(Utils::ToLocal(desc.ToObject(isolate)));
}


Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<String> key) {
Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<Name> key) {
auto context = ContextFromHeapObject(Utils::OpenHandle(this));
RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyDescriptor(context, key), Value);
}
Expand Down
21 changes: 15 additions & 6 deletions deps/v8/test/cctest/test-api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24362,12 +24362,13 @@ TEST(GetOwnPropertyDescriptor) {
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
CompileRun(
"var x = { value : 13};"
"Object.defineProperty(x, 'p0', {value : 12});"
"Object.defineProperty(x, 'p1', {"
" set : function(value) { this.value = value; },"
" get : function() { return this.value; },"
"});");
"var x = { value : 13};"
"Object.defineProperty(x, 'p0', {value : 12});"
"Object.defineProperty(x, Symbol.toStringTag, {value: 'foo'});"
"Object.defineProperty(x, 'p1', {"
" set : function(value) { this.value = value; },"
" get : function() { return this.value; },"
"});");
Local<Object> x = Local<Object>::Cast(
env->Global()->Get(env.local(), v8_str("x")).ToLocalChecked());
Local<Value> desc =
Expand Down Expand Up @@ -24401,6 +24402,14 @@ TEST(GetOwnPropertyDescriptor) {
->Equals(env.local(),
get->Call(env.local(), x, 0, NULL).ToLocalChecked())
.FromJust());
desc =
x->GetOwnPropertyDescriptor(env.local(), Symbol::GetToStringTag(isolate))
.ToLocalChecked();
CHECK(v8_str("foo")
->Equals(env.local(), Local<Object>::Cast(desc)
->Get(env.local(), v8_str("value"))
.ToLocalChecked())
.FromJust());
}


Expand Down