| OLD | NEW |
| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 Handle<Object> result; | 297 Handle<Object> result; |
| 298 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 298 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
| 299 GetOwnProperty(isolate, obj, name)); | 299 GetOwnProperty(isolate, obj, name)); |
| 300 return *result; | 300 return *result; |
| 301 } | 301 } |
| 302 | 302 |
| 303 | 303 |
| 304 RUNTIME_FUNCTION(Runtime_PreventExtensions) { | 304 RUNTIME_FUNCTION(Runtime_PreventExtensions) { |
| 305 HandleScope scope(isolate); | 305 HandleScope scope(isolate); |
| 306 DCHECK(args.length() == 1); | 306 DCHECK(args.length() == 1); |
| 307 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); | 307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0); |
| 308 Handle<Object> result; | 308 if (JSReceiver::PreventExtensions(obj, THROW_ON_ERROR).IsNothing()) |
| 309 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 309 return isolate->heap()->exception(); |
| 310 JSObject::PreventExtensions(obj)); | 310 return *obj; |
| 311 return *result; | |
| 312 } | 311 } |
| 313 | 312 |
| 314 | 313 |
| 315 RUNTIME_FUNCTION(Runtime_IsExtensible) { | 314 RUNTIME_FUNCTION(Runtime_IsExtensible) { |
| 316 HandleScope scope(isolate); | 315 HandleScope scope(isolate); |
| 317 DCHECK(args.length() == 1); | 316 DCHECK(args.length() == 1); |
| 318 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); | 317 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
| 319 return isolate->heap()->ToBoolean(JSObject::IsExtensible(obj)); | 318 return isolate->heap()->ToBoolean(JSObject::IsExtensible(obj)); |
| 320 } | 319 } |
| 321 | 320 |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 | 1613 |
| 1615 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { | 1614 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { |
| 1616 HandleScope scope(isolate); | 1615 HandleScope scope(isolate); |
| 1617 DCHECK(args.length() == 2); | 1616 DCHECK(args.length() == 2); |
| 1618 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); | 1617 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); |
| 1619 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); | 1618 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); |
| 1620 return JSReceiver::DefineProperties(isolate, o, properties); | 1619 return JSReceiver::DefineProperties(isolate, o, properties); |
| 1621 } | 1620 } |
| 1622 } // namespace internal | 1621 } // namespace internal |
| 1623 } // namespace v8 | 1622 } // namespace v8 |
| OLD | NEW |