Commit 7f64aa01 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Remove false checks since GetOwnProperty now throws an exception on access check violation.

BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/514613002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2dbdd413
...@@ -571,10 +571,6 @@ SetUpLockedPrototype(PropertyDescriptor, $Array( ...@@ -571,10 +571,6 @@ SetUpLockedPrototype(PropertyDescriptor, $Array(
// property descriptor. For a description of the array layout please // property descriptor. For a description of the array layout please
// see the runtime.cc file. // see the runtime.cc file.
function ConvertDescriptorArrayToDescriptor(desc_array) { function ConvertDescriptorArrayToDescriptor(desc_array) {
if (desc_array === false) {
throw 'Internal error: invalid desc_array';
}
if (IS_UNDEFINED(desc_array)) { if (IS_UNDEFINED(desc_array)) {
return UNDEFINED; return UNDEFINED;
} }
...@@ -649,9 +645,6 @@ function GetOwnPropertyJS(obj, v) { ...@@ -649,9 +645,6 @@ function GetOwnPropertyJS(obj, v) {
// If p is not a property on obj undefined is returned. // If p is not a property on obj undefined is returned.
var props = %GetOwnProperty(ToObject(obj), p); var props = %GetOwnProperty(ToObject(obj), p);
// A false value here means that access checks failed.
if (props === false) return UNDEFINED;
return ConvertDescriptorArrayToDescriptor(props); return ConvertDescriptorArrayToDescriptor(props);
} }
...@@ -692,11 +685,8 @@ function DefineProxyProperty(obj, p, attributes, should_throw) { ...@@ -692,11 +685,8 @@ function DefineProxyProperty(obj, p, attributes, should_throw) {
// ES5 8.12.9. // ES5 8.12.9.
function DefineObjectProperty(obj, p, desc, should_throw) { function DefineObjectProperty(obj, p, desc, should_throw) {
var current_or_access = %GetOwnProperty(ToObject(obj), ToName(p)); var current_array = %GetOwnProperty(ToObject(obj), ToName(p));
// A false value here means that access checks failed. var current = ConvertDescriptorArrayToDescriptor(current_array);
if (current_or_access === false) return UNDEFINED;
var current = ConvertDescriptorArrayToDescriptor(current_or_access);
var extensible = %IsExtensible(ToObject(obj)); var extensible = %IsExtensible(ToObject(obj));
// Error handling according to spec. // Error handling according to spec.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment