Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Unified Diff: src/v8natives.js

Issue 514613002: Remove false checks since GetOwnProperty now throws an exception on access check violation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 00d8a88d7342222a04357665c0b4ae9f11c0501b..a522738b881b9042f4a3cc0a44e3ec76e022229e 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -571,10 +571,6 @@ SetUpLockedPrototype(PropertyDescriptor, $Array(
// 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 @@ function GetOwnPropertyJS(obj, v) {
// 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 @@ function DefineProxyProperty(obj, p, attributes, should_throw) {
// 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698