Revision: 11714
Author:   [email protected]
Date:     Tue Jun  5 05:39:07 2012
Log:      Put inherited readonliness behind a flag,
since it currently breaks WebKit bindings massively.

[email protected]
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10535007
http://code.google.com/p/v8/source/detail?r=11714

Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/test/cctest/test-api.cc
 /branches/bleeding_edge/test/mjsunit/override-read-only-property.js
 /branches/bleeding_edge/test/mjsunit/readonly.js

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h      Fri May 25 05:32:02 2012
+++ /branches/bleeding_edge/src/flag-definitions.h      Tue Jun  5 05:39:07 2012
@@ -132,6 +132,8 @@

 // Flags for language modes and experimental language features.
 DEFINE_bool(use_strict, false, "enforce strict mode")
+DEFINE_bool(es5_readonly, false,
+            "activate correct semantics for inheriting readonliness")
 DEFINE_bool(es52_globals, false,
             "activate new semantics for global var declarations")

=======================================
--- /branches/bleeding_edge/src/objects.cc      Tue Jun  5 04:36:57 2012
+++ /branches/bleeding_edge/src/objects.cc      Tue Jun  5 05:39:07 2012
@@ -2134,6 +2134,7 @@
   }

// If we get here with *done true, we have encountered a read-only property.
+  if (!FLAG_es5_readonly) *done = false;
   if (*done) {
     if (strict_mode == kNonStrictMode) return value;
     Handle<Object> args[] = { Handle<Object>(name), Handle<Object>(this)};
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc     Fri Jun  1 03:51:36 2012
+++ /branches/bleeding_edge/test/cctest/test-api.cc     Tue Jun  5 05:39:07 2012
@@ -12151,6 +12151,7 @@
 // Test that we cannot set a property on the global object if there
 // is a read-only property in the prototype chain.
 TEST(ReadOnlyPropertyInGlobalProto) {
+  i::FLAG_es5_readonly = true;
   v8::HandleScope scope;
   v8::Handle<v8::ObjectTemplate> templ = v8::ObjectTemplate::New();
   LocalContext context(0, templ);
=======================================
--- /branches/bleeding_edge/test/mjsunit/override-read-only-property.js Fri Jun 1 03:51:36 2012 +++ /branches/bleeding_edge/test/mjsunit/override-read-only-property.js Tue Jun 5 05:39:07 2012
@@ -25,6 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+// Flags: --es5_readonly
+
 // According to ECMA-262, sections 8.6.2.2 and 8.6.2.3 you're not
 // allowed to override read-only properties, not even if the read-only
 // property is in the prototype chain.
=======================================
--- /branches/bleeding_edge/test/mjsunit/readonly.js Fri Jun 1 03:51:36 2012 +++ /branches/bleeding_edge/test/mjsunit/readonly.js Tue Jun 5 05:39:07 2012
@@ -25,7 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --allow-natives-syntax --harmony-proxies
+// Flags: --allow-natives-syntax --harmony-proxies --es5_readonly

 // Different ways to create an object.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to