Reviewers: Toon Verwaest,
Message:
PTAL
Description:
Fix invalid local property lookup for transitions.
BUG=361025
LOG=y
[email protected]
Please review this at https://codereview.chromium.org/224903023/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -9 lines):
M src/objects.cc
A + test/mjsunit/regress/regress-361025.js
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
d370e123380ba1d5a3cf2ab23005c94316621976..f91875ba7f9ed312466989cb27d81dc7ce1431c2
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4228,11 +4228,10 @@ MaybeHandle<Object>
JSObject::SetLocalPropertyIgnoreAttributes(
name, value, attributes, value_type, mode, extensibility_check);
}
- if (lookup.IsFound() &&
- (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) {
+ if (lookup.IsInterceptor() ||
+ (lookup.IsDescriptorOrDictionary() && lookup.type() == CALLBACKS)) {
object->LocalLookupRealNamedProperty(*name, &lookup);
}
-
// Check for accessor in prototype chain removed here in clone.
if (!lookup.IsFound()) {
object->map()->LookupTransition(*object, *name, &lookup);
Index: test/mjsunit/regress/regress-361025.js
diff --git a/test/mjsunit/regress/regress-347530.js
b/test/mjsunit/regress/regress-361025.js
similarity index 65%
copy from test/mjsunit/regress/regress-347530.js
copy to test/mjsunit/regress/regress-361025.js
index
330fda38c01b5b3c8cc3926fda0520b086aa7289..74f50d86e8db982902b700ad7c1dcc56194710eb
100644
--- a/test/mjsunit/regress/regress-347530.js
+++ b/test/mjsunit/regress/regress-361025.js
@@ -3,10 +3,8 @@
// found in the LICENSE file.
// Flags: --expose-gc
-a = [];
-a[1000] = .1;
-a.length = 0;
-gc();
+
+var x = new Object();
+x.__defineGetter__('a', function() { return 7 });
+JSON.parse('{"a":2600753951}');
gc();
-a[1000] = .1;
-assertEquals(.1, a[1000]);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.