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

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

Issue 1417063011: [runtime] support new Proxy() instead of Proxy.create and install getPrototypeOf trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding proxy trap strings Created 5 years, 1 month 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
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 MAYBE_RETURN_NULL(Object::SetProperty(&it, value, language_mode, 151 MAYBE_RETURN_NULL(Object::SetProperty(&it, value, language_mode,
152 Object::MAY_BE_STORE_FROM_KEYED)); 152 Object::MAY_BE_STORE_FROM_KEYED));
153 return value; 153 return value;
154 } 154 }
155 155
156 156
157 RUNTIME_FUNCTION(Runtime_GetPrototype) { 157 RUNTIME_FUNCTION(Runtime_GetPrototype) {
158 HandleScope scope(isolate); 158 HandleScope scope(isolate);
159 DCHECK(args.length() == 1); 159 DCHECK(args.length() == 1);
160 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); 160 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
161 return *Object::GetPrototype(isolate, obj); 161 Handle<Object> prototype;
162 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, prototype,
163 Object::GetPrototype(isolate, obj));
164 return *prototype;
162 } 165 }
163 166
164 167
165 RUNTIME_FUNCTION(Runtime_InternalSetPrototype) { 168 RUNTIME_FUNCTION(Runtime_InternalSetPrototype) {
166 HandleScope scope(isolate); 169 HandleScope scope(isolate);
167 DCHECK(args.length() == 2); 170 DCHECK(args.length() == 2);
168 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0); 171 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
169 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); 172 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
170 MAYBE_RETURN( 173 MAYBE_RETURN(
171 JSReceiver::SetPrototype(obj, prototype, false, Object::THROW_ON_ERROR), 174 JSReceiver::SetPrototype(obj, prototype, false, Object::THROW_ON_ERROR),
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 1561
1559 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { 1562 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) {
1560 HandleScope scope(isolate); 1563 HandleScope scope(isolate);
1561 DCHECK(args.length() == 2); 1564 DCHECK(args.length() == 2);
1562 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); 1565 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0);
1563 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); 1566 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1);
1564 return JSReceiver::DefineProperties(isolate, o, properties); 1567 return JSReceiver::DefineProperties(isolate, o, properties);
1565 } 1568 }
1566 } // namespace internal 1569 } // namespace internal
1567 } // namespace v8 1570 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698