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

Side by Side Diff: src/runtime/runtime-object.cc

Issue 1513713002: [cleanup] [proxies] Unify style of recently written code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 years 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-scopes.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // 1. Let obj be ? ToObject(O). 280 // 1. Let obj be ? ToObject(O).
281 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, object, 281 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, object,
282 Execution::ToObject(isolate, object)); 282 Execution::ToObject(isolate, object));
283 // 2. Let key be ? ToPropertyKey(P). 283 // 2. Let key be ? ToPropertyKey(P).
284 Handle<Name> key; 284 Handle<Name> key;
285 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, key, 285 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, key,
286 Object::ToName(isolate, raw_name)); 286 Object::ToName(isolate, raw_name));
287 287
288 // 3. Let desc be ? obj.[[GetOwnProperty]](key). 288 // 3. Let desc be ? obj.[[GetOwnProperty]](key).
289 PropertyDescriptor desc; 289 PropertyDescriptor desc;
290 bool found = JSReceiver::GetOwnPropertyDescriptor( 290 Maybe<bool> found = JSReceiver::GetOwnPropertyDescriptor(
291 isolate, Handle<JSReceiver>::cast(object), key, &desc); 291 isolate, Handle<JSReceiver>::cast(object), key, &desc);
292 if (isolate->has_pending_exception()) return isolate->heap()->exception(); 292 MAYBE_RETURN(found, isolate->heap()->exception());
293 // 4. Return FromPropertyDescriptor(desc). 293 // 4. Return FromPropertyDescriptor(desc).
294 if (!found) return isolate->heap()->undefined_value(); 294 if (!found.FromJust()) return isolate->heap()->undefined_value();
295 return *desc.ToObject(isolate); 295 return *desc.ToObject(isolate);
296 } 296 }
297 297
298 298
299 RUNTIME_FUNCTION(Runtime_PreventExtensions) { 299 RUNTIME_FUNCTION(Runtime_PreventExtensions) {
300 HandleScope scope(isolate); 300 HandleScope scope(isolate);
301 DCHECK(args.length() == 1); 301 DCHECK(args.length() == 1);
302 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0); 302 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
303 MAYBE_RETURN(JSReceiver::PreventExtensions(obj, Object::THROW_ON_ERROR), 303 MAYBE_RETURN(JSReceiver::PreventExtensions(obj, Object::THROW_ON_ERROR),
304 isolate->heap()->exception()); 304 isolate->heap()->exception());
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 1434
1435 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { 1435 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) {
1436 HandleScope scope(isolate); 1436 HandleScope scope(isolate);
1437 DCHECK(args.length() == 2); 1437 DCHECK(args.length() == 2);
1438 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); 1438 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0);
1439 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); 1439 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1);
1440 return JSReceiver::DefineProperties(isolate, o, properties); 1440 return JSReceiver::DefineProperties(isolate, o, properties);
1441 } 1441 }
1442 } // namespace internal 1442 } // namespace internal
1443 } // namespace v8 1443 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698