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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 | 1568 |
1566 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { | 1569 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { |
1567 HandleScope scope(isolate); | 1570 HandleScope scope(isolate); |
1568 DCHECK(args.length() == 2); | 1571 DCHECK(args.length() == 2); |
1569 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); | 1572 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); |
1570 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); | 1573 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); |
1571 return JSReceiver::DefineProperties(isolate, o, properties); | 1574 return JSReceiver::DefineProperties(isolate, o, properties); |
1572 } | 1575 } |
1573 } // namespace internal | 1576 } // namespace internal |
1574 } // namespace v8 | 1577 } // namespace v8 |
OLD | NEW |