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 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); | 1559 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
1560 CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2); | 1560 CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2); |
1561 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); | 1561 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); |
1562 | 1562 |
1563 RETURN_FAILURE_ON_EXCEPTION( | 1563 RETURN_FAILURE_ON_EXCEPTION( |
1564 isolate, | 1564 isolate, |
1565 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), | 1565 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), |
1566 setter, attrs)); | 1566 setter, attrs)); |
1567 return isolate->heap()->undefined_value(); | 1567 return isolate->heap()->undefined_value(); |
1568 } | 1568 } |
| 1569 |
| 1570 |
| 1571 RUNTIME_FUNCTION(Runtime_ThrowNonCoercible) { |
| 1572 HandleScope scope(isolate); |
| 1573 DCHECK(args.length() == 0); |
| 1574 THROW_NEW_ERROR_RETURN_FAILURE(isolate, |
| 1575 NewTypeError(MessageTemplate::kNonCoercible)); |
| 1576 } |
1569 } | 1577 } |
1570 } // namespace v8::internal | 1578 } // namespace v8::internal |
OLD | NEW |