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

Side by Side Diff: src/accessors.cc

Issue 415133003: Use result of SetOwnPropertyIgnoreAttributes in accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 Handle<Object> holder = Utils::OpenHandle(*info.Holder()); 142 Handle<Object> holder = Utils::OpenHandle(*info.Holder());
143 Handle<Object> receiver = Utils::OpenHandle(*info.This()); 143 Handle<Object> receiver = Utils::OpenHandle(*info.This());
144 if (*holder == *receiver) return false; 144 if (*holder == *receiver) return false;
145 if (receiver->IsJSObject()) { 145 if (receiver->IsJSObject()) {
146 Handle<JSObject> object = Handle<JSObject>::cast(receiver); 146 Handle<JSObject> object = Handle<JSObject>::cast(receiver);
147 // This behaves sloppy since we lost the actual strict-mode. 147 // This behaves sloppy since we lost the actual strict-mode.
148 // TODO(verwaest): Fix by making ExecutableAccessorInfo behave like data 148 // TODO(verwaest): Fix by making ExecutableAccessorInfo behave like data
149 // properties. 149 // properties.
150 if (!object->map()->is_extensible()) return true; 150 if (!object->map()->is_extensible()) return true;
151 JSObject::SetOwnPropertyIgnoreAttributes(object, Utils::OpenHandle(*name), 151 JSObject::SetOwnPropertyIgnoreAttributes(object, Utils::OpenHandle(*name),
152 value, NONE); 152 value, NONE).Check();
153 } 153 }
154 return true; 154 return true;
155 } 155 }
156 156
157 157
158 // 158 //
159 // Accessors::ArrayLength 159 // Accessors::ArrayLength
160 // 160 //
161 161
162 162
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 info->set_data(Smi::FromInt(index)); 1354 info->set_data(Smi::FromInt(index));
1355 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1355 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1356 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1356 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1357 info->set_getter(*getter); 1357 info->set_getter(*getter);
1358 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1358 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1359 return info; 1359 return info;
1360 } 1360 }
1361 1361
1362 1362
1363 } } // namespace v8::internal 1363 } } // namespace v8::internal
OLDNEW
« 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