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

Unified Diff: src/v8natives.js

Issue 7701023: Added access check to Runtime_GetPrototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Allow JSProxy in GetPrototype, but only without access checks. Created 9 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 | « src/runtime.cc ('k') | test/cctest/test-api.cc » ('j') | 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 c16d73e82ed05dc75890a8ba4e82c965330ffc92..cc3bb4f0690bed66270b1434ca15108577168c92 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -621,38 +621,6 @@ function CallTrap2(handler, name, defaultTrap, x, y) {
}
-// ES5 section 8.12.2.
-function GetProperty(obj, p) {
- if (%IsJSProxy(obj)) {
- var handler = %GetHandler(obj);
- var descriptor = CallTrap1(obj, "getPropertyDescriptor", void 0, p);
- if (IS_UNDEFINED(descriptor)) return descriptor;
- var desc = ToCompletePropertyDescriptor(descriptor);
- if (!desc.isConfigurable()) {
- throw MakeTypeError("proxy_prop_not_configurable",
- [handler, "getPropertyDescriptor", p, descriptor]);
- }
- return desc;
- }
- var prop = GetOwnProperty(obj);
- if (!IS_UNDEFINED(prop)) return prop;
- var proto = %GetPrototype(obj);
- if (IS_NULL(proto)) return void 0;
- return GetProperty(proto, p);
-}
-
-
-// ES5 section 8.12.6
-function HasProperty(obj, p) {
- if (%IsJSProxy(obj)) {
- var handler = %GetHandler(obj);
- return ToBoolean(CallTrap1(handler, "has", DerivedHasTrap, p));
- }
- var desc = GetProperty(obj, p);
- return IS_UNDEFINED(desc) ? false : true;
-}
-
-
// ES5 section 8.12.1.
function GetOwnProperty(obj, v) {
var p = ToString(v);
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698