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

Unified Diff: src/objects.cc

Issue 1413723011: Fix accessor map transitions vs. Object.defineProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add testcase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ecd31f7f5b531a6cc05d041d247704a0429dcf22..4f69a12f64e9c60fcfa7a08cd54b14a8ec80fc10 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6144,11 +6144,11 @@ bool JSReceiver::OrdinaryDefineOwnProperty(LookupIterator* it,
Handle<Object> getter(
desc->has_get()
? desc->get()
- : Handle<Object>::cast(isolate->factory()->undefined_value()));
+ : Handle<Object>::cast(isolate->factory()->null_value()));
Handle<Object> setter(
desc->has_set()
? desc->set()
- : Handle<Object>::cast(isolate->factory()->undefined_value()));
+ : Handle<Object>::cast(isolate->factory()->null_value()));
MaybeHandle<Object> result =
JSObject::DefineAccessor(it, getter, setter, desc->ToAttributes());
if (result.is_null()) return false;
@@ -6341,15 +6341,15 @@ bool JSReceiver::OrdinaryDefineOwnProperty(LookupIterator* it,
Handle<Object> getter(
desc->has_get()
? desc->get()
- : current.has_get() ? current.get()
- : Handle<Object>::cast(
- isolate->factory()->undefined_value()));
+ : current.has_get()
+ ? current.get()
+ : Handle<Object>::cast(isolate->factory()->null_value()));
Handle<Object> setter(
desc->has_set()
? desc->set()
- : current.has_set() ? current.set()
- : Handle<Object>::cast(
- isolate->factory()->undefined_value()));
+ : current.has_set()
+ ? current.set()
+ : Handle<Object>::cast(isolate->factory()->null_value()));
MaybeHandle<Object> result =
JSObject::DefineAccessor(it, getter, setter, attrs);
if (result.is_null()) return false;
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698