| 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/v8.h" | 5 #include "src/v8.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.h" | 9 #include "src/debug.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 578 |
| 579 | 579 |
| 580 RUNTIME_FUNCTION(Runtime_DeleteProperty) { | 580 RUNTIME_FUNCTION(Runtime_DeleteProperty) { |
| 581 HandleScope scope(isolate); | 581 HandleScope scope(isolate); |
| 582 DCHECK(args.length() == 3); | 582 DCHECK(args.length() == 3); |
| 583 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); | 583 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); |
| 584 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); | 584 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); |
| 585 CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 2); | 585 CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 2); |
| 586 Handle<Object> result; | 586 Handle<Object> result; |
| 587 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 587 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 588 isolate, result, JSReceiver::DeleteProperty(object, key, language_mode)); | 588 isolate, result, |
| 589 JSReceiver::DeletePropertyOrElement(object, key, language_mode)); |
| 589 return *result; | 590 return *result; |
| 590 } | 591 } |
| 591 | 592 |
| 592 | 593 |
| 593 static Object* HasOwnPropertyImplementation(Isolate* isolate, | 594 static Object* HasOwnPropertyImplementation(Isolate* isolate, |
| 594 Handle<JSObject> object, | 595 Handle<JSObject> object, |
| 595 Handle<Name> key) { | 596 Handle<Name> key) { |
| 596 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key); | 597 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key); |
| 597 if (!maybe.IsJust()) return isolate->heap()->exception(); | 598 if (!maybe.IsJust()) return isolate->heap()->exception(); |
| 598 if (maybe.FromJust()) return isolate->heap()->true_value(); | 599 if (maybe.FromJust()) return isolate->heap()->true_value(); |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); | 1404 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); |
| 1404 | 1405 |
| 1405 RETURN_FAILURE_ON_EXCEPTION( | 1406 RETURN_FAILURE_ON_EXCEPTION( |
| 1406 isolate, | 1407 isolate, |
| 1407 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), | 1408 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), |
| 1408 setter, attrs)); | 1409 setter, attrs)); |
| 1409 return isolate->heap()->undefined_value(); | 1410 return isolate->heap()->undefined_value(); |
| 1410 } | 1411 } |
| 1411 } // namespace internal | 1412 } // namespace internal |
| 1412 } // namespace v8 | 1413 } // namespace v8 |
| OLD | NEW |