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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 DCHECK(args.length() == 1); | 303 DCHECK(args.length() == 1); |
304 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); | 304 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
305 Handle<Object> result; | 305 Handle<Object> result; |
306 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 306 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
307 JSObject::PreventExtensions(obj)); | 307 JSObject::PreventExtensions(obj)); |
308 return *result; | 308 return *result; |
309 } | 309 } |
310 | 310 |
311 | 311 |
312 RUNTIME_FUNCTION(Runtime_IsExtensible) { | 312 RUNTIME_FUNCTION(Runtime_IsExtensible) { |
313 SealHandleScope shs(isolate); | 313 HandleScope scope(isolate); |
314 DCHECK(args.length() == 1); | 314 DCHECK(args.length() == 1); |
315 CONVERT_ARG_CHECKED(JSObject, obj, 0); | 315 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
316 return isolate->heap()->ToBoolean(obj->IsExtensible()); | 316 return isolate->heap()->ToBoolean(JSObject::IsExtensible(obj)); |
317 } | 317 } |
318 | 318 |
319 | 319 |
320 RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) { | 320 RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) { |
321 HandleScope scope(isolate); | 321 HandleScope scope(isolate); |
322 DCHECK(args.length() == 2); | 322 DCHECK(args.length() == 2); |
323 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 323 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
324 CONVERT_SMI_ARG_CHECKED(properties, 1); | 324 CONVERT_SMI_ARG_CHECKED(properties, 1); |
325 // Conservative upper limit to prevent fuzz tests from going OOM. | 325 // Conservative upper limit to prevent fuzz tests from going OOM. |
326 RUNTIME_ASSERT(properties <= 100000); | 326 RUNTIME_ASSERT(properties <= 100000); |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) { | 1606 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) { |
1607 SealHandleScope shs(isolate); | 1607 SealHandleScope shs(isolate); |
1608 DCHECK_EQ(1, args.length()); | 1608 DCHECK_EQ(1, args.length()); |
1609 CONVERT_ARG_CHECKED(Object, object, 0); | 1609 CONVERT_ARG_CHECKED(Object, object, 0); |
1610 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded()); | 1610 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded()); |
1611 } | 1611 } |
1612 | 1612 |
1613 | 1613 |
1614 } // namespace internal | 1614 } // namespace internal |
1615 } // namespace v8 | 1615 } // namespace v8 |
OLD | NEW |