Revision: 11719
Author: [email protected]
Date: Tue Jun 5 09:56:53 2012
Log: Remove one more case behind --es5_readonly flag.
Plus add a couple of assertions.
[email protected]
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10535011
http://code.google.com/p/v8/source/detail?r=11719
Modified:
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/test/cctest/test-api.cc
/branches/bleeding_edge/test/mjsunit/with-readonly.js
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Tue Jun 5 01:59:39 2012
+++ /branches/bleeding_edge/src/hydrogen.cc Tue Jun 5 09:56:53 2012
@@ -4684,6 +4684,7 @@
} else {
// Otherwise, find the top prototype.
while (proto->GetPrototype()->IsJSObject()) proto =
proto->GetPrototype();
+ ASSERT(proto->GetPrototype()->IsNull());
}
ASSERT(proto->IsJSObject());
AddInstruction(new(zone()) HCheckPrototypeMaps(
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Jun 5 05:39:07 2012
+++ /branches/bleeding_edge/src/objects.cc Tue Jun 5 09:56:53 2012
@@ -2117,6 +2117,7 @@
break;
}
case CALLBACKS: {
+ if (!FLAG_es5_readonly && result.IsReadOnly()) break;
*done = true;
return SetPropertyWithCallback(result.GetCallbackObject(),
name, value, result.holder(), strict_mode);
@@ -2550,6 +2551,7 @@
return result->HandlerResult(JSProxy::cast(pt));
}
JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result);
+ ASSERT(!(result->IsProperty() && result->type() == INTERCEPTOR));
if (result->IsProperty()) return;
}
result->NotFound();
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Tue Jun 5 05:39:07 2012
+++ /branches/bleeding_edge/test/cctest/test-api.cc Tue Jun 5 09:56:53 2012
@@ -10260,6 +10260,7 @@
THREADED_TEST(Overriding) {
+ i::FLAG_es5_readonly = true;
v8::HandleScope scope;
LocalContext context;
=======================================
--- /branches/bleeding_edge/test/mjsunit/with-readonly.js Fri Jun 1
03:51:36 2012
+++ /branches/bleeding_edge/test/mjsunit/with-readonly.js Tue Jun 5
09:56:53 2012
@@ -27,6 +27,8 @@
// Test that readonly variables are treated correctly.
+// Flags: --es5_readonly
+
// Create an object with a read-only length property in the prototype
// chain by putting the string split function in the prototype chain.
var o = {};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev