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

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

Issue 854493004: Remove ForceDelete (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.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/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/runtime/runtime.h" 10 #include "src/runtime/runtime.h"
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 return *result; 758 return *result;
759 } 759 }
760 760
761 761
762 RUNTIME_FUNCTION(Runtime_DeleteProperty) { 762 RUNTIME_FUNCTION(Runtime_DeleteProperty) {
763 HandleScope scope(isolate); 763 HandleScope scope(isolate);
764 DCHECK(args.length() == 3); 764 DCHECK(args.length() == 3);
765 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); 765 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
766 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); 766 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
767 CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 2); 767 CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 2);
768 JSReceiver::DeleteMode delete_mode = strict_mode == STRICT
769 ? JSReceiver::STRICT_DELETION
770 : JSReceiver::NORMAL_DELETION;
771 Handle<Object> result; 768 Handle<Object> result;
772 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 769 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
773 isolate, result, JSReceiver::DeleteProperty(object, key, delete_mode)); 770 isolate, result, JSReceiver::DeleteProperty(object, key, strict_mode));
774 return *result; 771 return *result;
775 } 772 }
776 773
777 774
778 static Object* HasOwnPropertyImplementation(Isolate* isolate, 775 static Object* HasOwnPropertyImplementation(Isolate* isolate,
779 Handle<JSObject> object, 776 Handle<JSObject> object,
780 Handle<Name> key) { 777 Handle<Name> key) {
781 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key); 778 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key);
782 if (!maybe.has_value) return isolate->heap()->exception(); 779 if (!maybe.has_value) return isolate->heap()->exception();
783 if (maybe.value) return isolate->heap()->true_value(); 780 if (maybe.value) return isolate->heap()->true_value();
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 1598
1602 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1599 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1603 SealHandleScope shs(isolate); 1600 SealHandleScope shs(isolate);
1604 DCHECK(args.length() == 1); 1601 DCHECK(args.length() == 1);
1605 CONVERT_ARG_CHECKED(Object, obj, 0); 1602 CONVERT_ARG_CHECKED(Object, obj, 0);
1606 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1603 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1607 return JSReceiver::cast(obj)->class_name(); 1604 return JSReceiver::cast(obj)->class_name();
1608 } 1605 }
1609 } 1606 }
1610 } // namespace v8::internal 1607 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698