| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 RUNTIME_FUNCTION(Runtime_DefineClassMethod) { | 159 RUNTIME_FUNCTION(Runtime_DefineClassMethod) { |
| 160 HandleScope scope(isolate); | 160 HandleScope scope(isolate); |
| 161 DCHECK(args.length() == 3); | 161 DCHECK(args.length() == 3); |
| 162 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 162 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 163 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); | 163 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
| 164 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 2); | 164 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 2); |
| 165 | 165 |
| 166 uint32_t index; | 166 uint32_t index; |
| 167 if (name->AsArrayIndex(&index)) { | 167 if (name->AsArrayIndex(&index)) { |
| 168 RETURN_FAILURE_ON_EXCEPTION( | 168 RETURN_FAILURE_ON_EXCEPTION( |
| 169 isolate, JSObject::SetOwnElement(object, index, function, STRICT)); | 169 isolate, |
| 170 JSObject::SetOwnElement(object, index, function, DONT_ENUM, STRICT)); |
| 170 } else { | 171 } else { |
| 171 RETURN_FAILURE_ON_EXCEPTION( | 172 RETURN_FAILURE_ON_EXCEPTION( |
| 172 isolate, | 173 isolate, JSObject::SetOwnPropertyIgnoreAttributes(object, name, |
| 173 JSObject::SetOwnPropertyIgnoreAttributes(object, name, function, NONE)); | 174 function, DONT_ENUM)); |
| 174 } | 175 } |
| 175 return isolate->heap()->undefined_value(); | 176 return isolate->heap()->undefined_value(); |
| 176 } | 177 } |
| 177 | 178 |
| 178 | 179 |
| 179 RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) { | 180 RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) { |
| 180 HandleScope shs(isolate); | 181 HandleScope shs(isolate); |
| 181 DCHECK(args.length() == 1); | 182 DCHECK(args.length() == 1); |
| 182 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); | 183 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
| 183 | 184 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 445 } |
| 445 | 446 |
| 446 Handle<Object> result; | 447 Handle<Object> result; |
| 447 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 448 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 448 isolate, result, | 449 isolate, result, |
| 449 Execution::Call(isolate, proto_function, receiver, argc, argv, false)); | 450 Execution::Call(isolate, proto_function, receiver, argc, argv, false)); |
| 450 return *result; | 451 return *result; |
| 451 } | 452 } |
| 452 } | 453 } |
| 453 } // namespace v8::internal | 454 } // namespace v8::internal |
| OLD | NEW |