Revision: 23452
Author:   [email protected]
Date:     Wed Aug 27 11:42:17 2014 UTC
Log: Remove false checks since GetOwnProperty now throws an exception on access check violation.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/514613002
https://code.google.com/p/v8/source/detail?r=23452

Modified:
 /branches/bleeding_edge/src/v8natives.js

=======================================
--- /branches/bleeding_edge/src/v8natives.js    Tue Aug 19 17:02:04 2014 UTC
+++ /branches/bleeding_edge/src/v8natives.js    Wed Aug 27 11:42:17 2014 UTC
@@ -571,10 +571,6 @@
 // property descriptor. For a description of the array layout please
 // see the runtime.cc file.
 function ConvertDescriptorArrayToDescriptor(desc_array) {
-  if (desc_array === false) {
-    throw 'Internal error: invalid desc_array';
-  }
-
   if (IS_UNDEFINED(desc_array)) {
     return UNDEFINED;
   }
@@ -649,9 +645,6 @@
   // If p is not a property on obj undefined is returned.
   var props = %GetOwnProperty(ToObject(obj), p);

-  // A false value here means that access checks failed.
-  if (props === false) return UNDEFINED;
-
   return ConvertDescriptorArrayToDescriptor(props);
 }

@@ -692,11 +685,8 @@

 // ES5 8.12.9.
 function DefineObjectProperty(obj, p, desc, should_throw) {
-  var current_or_access = %GetOwnProperty(ToObject(obj), ToName(p));
-  // A false value here means that access checks failed.
-  if (current_or_access === false) return UNDEFINED;
-
-  var current = ConvertDescriptorArrayToDescriptor(current_or_access);
+  var current_array = %GetOwnProperty(ToObject(obj), ToName(p));
+  var current = ConvertDescriptorArrayToDescriptor(current_array);
   var extensible = %IsExtensible(ToObject(obj));

   // Error handling according to spec.

--
--
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.

Reply via email to