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

Side by Side Diff: src/apinatives.js

Issue 332863003: Remove AccessControl from AccessorPairs, as it's an invalid usecase of AllCan* (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 "use strict"; 5 "use strict";
6 6
7 // This file contains infrastructure used by the API. See 7 // This file contains infrastructure used by the API. See
8 // v8natives.js for an explanation of these files are processed and 8 // v8natives.js for an explanation of these files are processed and
9 // loaded. 9 // loaded.
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 var requires_access_checks = %DisableAccessChecks(obj); 87 var requires_access_checks = %DisableAccessChecks(obj);
88 try { 88 try {
89 for (var i = 1; i < properties[0];) { 89 for (var i = 1; i < properties[0];) {
90 var length = properties[i]; 90 var length = properties[i];
91 if (length == 3) { 91 if (length == 3) {
92 var name = properties[i + 1]; 92 var name = properties[i + 1];
93 var prop_data = properties[i + 2]; 93 var prop_data = properties[i + 2];
94 var attributes = properties[i + 3]; 94 var attributes = properties[i + 3];
95 var value = Instantiate(prop_data, name); 95 var value = Instantiate(prop_data, name);
96 %SetProperty(obj, name, value, attributes); 96 %SetProperty(obj, name, value, attributes);
97 } else if (length == 5) { 97 } else if (length == 4 || length == 5) {
98 // TODO(verwaest): The 5th value used to be access_control. Remove once
99 // the bindings are updated.
98 var name = properties[i + 1]; 100 var name = properties[i + 1];
99 var getter = properties[i + 2]; 101 var getter = properties[i + 2];
100 var setter = properties[i + 3]; 102 var setter = properties[i + 3];
101 var attribute = properties[i + 4]; 103 var attribute = properties[i + 4];
102 var access_control = properties[i + 5]; 104 %SetAccessorProperty(obj, name, getter, setter, attribute);
103 %SetAccessorProperty(
104 obj, name, getter, setter, attribute, access_control);
105 } else { 105 } else {
106 throw "Bad properties array"; 106 throw "Bad properties array";
107 } 107 }
108 i += length + 1; 108 i += length + 1;
109 } 109 }
110 } finally { 110 } finally {
111 if (requires_access_checks) %EnableAccessChecks(obj); 111 if (requires_access_checks) %EnableAccessChecks(obj);
112 } 112 }
113 } 113 }
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698